Wordpress/Woocommerce checkout page 500 error - wordpress

Im getting 500 error page on my woocommerce store checkout page. I noticed that when cart is empty there is no error, only when I add products in it
the address is https://www.belizajec.si/webshop/checkout/
when debug mode enabled I get this error
Notice: register_sidebar was called incorrectly. No id was set in the arguments array for the "Translator For Header" sidebar. Defaulting to "sidebar-1". Manually set the id to "sidebar-1" to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in /home/apartkri/public_html/webshop/wp-includes/functions.php on line 4137
Fatal error: Class 'WC_Gateway_Paypal' not found in /home/apartkri/public_html/webshop/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php on line 105
thanks

Did you update to WooCommerce 3.0? Make sure the theme you are using is compatible with WooCommerce 3.0. If it's a plugin you are using for Paypal disable it first and see if thats the one causing an issue.
Seems like some incompatibility.

ok, the problem was solved by re-uploading all Woocommerce files over existing files on server.

This seems to be the plugin / theme conflict issue and to be honest cannot be judge directly.
However, there are some primary steps which you can follow, as below :-
Disable all plugins except "Woocommerce"
Activate WordPress default theme
After this check by following same procedure.
Let me know if I can help you further...

Related

Cannot read property 'getCollectionByRoute' of undefined - Gutenberg wordpress

Gutenberg Editor In worpdress keep crashing from time ti time and i get the message "The editor has encountered an unexpected error".
When I open the console I get a React error that said:" Cannot read property 'getCollectionByRoute' of undefined".
Anyone have any idea what causes this problem?
I'm facing the same problem as you, so I think it's something related to the post categories. So as a workaround to allow you editing your posts you can clean your site cookies and the next time you edit your post don't expand the categories section. If you need it then use the quick edit.

woocommerce attributes not showing on front end

I have setup a Woocommerce store with hundreds of variable products (months ago). Everything has been working great with product variations/attributes so far, but today I got a message saying that customers are unable to pick a size for some of our products.
So, I have been looking into this, but I do not see why this is not working as intended...
I have set the attributes correctly on the back-end, I know this because it has been working as intended for the last 6+ months. I have also looked at the attributes & variations settings for these products, and they are all still set correctly.
Then, I double-checked to make sure the variation still had a price set, which it does.
Then, I checked the front-end of the site, and sure enough, the "size" attributes no longer show any options.
Any thoughts on why this might be? I have looked around stackoverflow a bit already... and the only thing I have found that I haven't tried yet, is: disabling all the plugins and reverting the site's theme to a default theme... I am really trying to avoid going down that road...
Sample URL (manually set product "Size" attributes on product page back-end):
https://www.worldequestrianbrands.com/product/contour-all-purpose-pad-with-bare-flaps/
Any/all help is greatly appreciated!
WordPress: 4.7.4 - WooCommerce: 3.0.5
Update #1:
Follow up:
After investigation, and an email from a fellow stackoverflow user, I have narrowed this down to a plugin version incompatibility with WooCommerce 3.0.5. Rolling back to WC 3.0.4 restored all the products' custom attributes to the front-end of the site. I am not sure what or why this issue happened, all I know is that rolling back WC was as a temporary workaround.
More Info:
When I first posted this issue on stackoverflow, I was running WC 3.0.5. When running that version, this was my experience:
I have Variable Products setup with multiple Custom Attributes (set for each product, not through the WooCommerce > Attributes settings admin-sidebar feature of WC).
If I went to edit a Variable Product with custom attributes, all of custom attributes showed up fine on the back-end, but only 1 of the custom attributes would not show any options on the front-end (e.g. "size" attribute).
Looking again at the back-end of the product, the size attribute is listed, with variations, and a set price.
I tried clicking "Update" on a product, just to see what would happen, and when the back-end page reloaded, the custom attribute I set was gone (e.g. "size").
So, I figured it wasn't loading that Custom Attribute for some reason, so I went to the proper: WooCommerce > Attributes, and set the "size" attributes there
Then went back to the variable products, and added the newly set "size" attributes, from the proper WooCommerce > Attributes that I setup
Clicked "Update" to commit the changes, and there we go, now the "size" attribute shows up correctly on the front-end
I manually updated over 100+ products this way
A fellow stackoverflow user emailed me and mentioned he had the same issue, but rolling back to WC 3.0.4 worked for him, as a "workaround"
I rolled WC back from 3.0.5 > 3.0.4, and boom, all the Custom Attributes we have set are now loading on the front-end of each product, as intended.
So, after all of that... I am still not sure exactly what is causing the issue, all I know is rolling back WC seems to allow certain Custom Attributes to be displayed again, on the front-end.
If I find out anything else, I'll be sure to update here!
Thank you again for any/all help with this! I am glad this 'workaround' is possible, for now, but the root of the issue is still unresolved.
I have not looked at any PHP or any other server logs yet, due to limited time, but I am happy to report any follow up info I can - or the actual issue AND solution! :)
Any other insights are greatly appreciated! I am still curious why this is happening...
Cheers!
Update #2:
This seems to be a known issue with WooCommerce 3.0.5, as stated on github
"We've identified the cause of the errors. This issue happens when you have a custom attribute with the same name as a global attribute. We're working on a fix now."

Invalid post type - wordpress

I have a big problem and i dont know how to solve it. I have noticed that at dashboard when i pressed on "all posts" i get this ugly error:
"Invalid post type"
nothing more nothing less
I have tried a lot of things:
1. Update to latest version
2. Roll back to 3.9.1
3. Deactivated/activated all plugins
4. Deactivated custome theme
5. Modify edit.php locate in wp-admin folder and set this
$typenow = 'post';
if ( ! $typenow )
wp_die( __( 'Invalid post type' ) );
After this modification the "invalid post type" error was gone but when I was trying to modify a post at dashboard I noticed that the right column (category select, preview etc) was missing.
Does anyone knows how to fix this problem? Any ideas?
Thank you in advance,
P.S:
Please follow those links to see what I am trying to explain
https://dl.dropboxusercontent.com/u/5502709/wp.png
https://dl.dropboxusercontent.com/u/5502709/wp1.png
Late to the party, but I share this in case anyone comes looking with a similar problem to solve. It isn't a 'fix' but seems to be a 'workaround'.
I'm getting the "Invalid post type" error when I try to edit multiple custom posts in the edit screen. I think I may know a plugin that is causing it, but it's so integral to my site I can't just disable it, even just while I do the editing, so I was faced with the choice of either doing a LOT of individual edits, or coming up with a solution. This is what is working for me:
Set up all of the editing you want as normal. On 'enter' you get the "Invalid post type" message ... but the command phrase is still in the browser bar. Part of the phrase contains'post_type='. For me, at least, rather than the post type I'm trying to edit, it's showing the word 'Array'. By over typing that word with the actual custom post type name, then hitting 'enter' again it processes correctly. (I'm getting a message, but it's a notification or warning rather than an actual error message.)
Hope this helps someone. :-)
Same issue here as described by Kevin4fm:
When I select multiple items for moving to trash and after I hit the button, I can see the following URL in the adress bar of my browser together with the message "invalid post type":
http://example.com/wp-admin/edit.php?s=&post_status=all&post_type=Array&author=5&_wpnonce=67fdf1328g&_wp_http_referer=%2Fwp-admin%2Fedit.php%3Fpost_type%3DCPT%26author%3D5&action=trash&m=0&cat=0&paged=1&post%5B%5D=9462&post%5B%5D=7093&action2=-1
So I have changed the URL to the following and it works fine:
http://example.com/wp-admin/edit.php?s=&post_status=all&post_type=CPT&author=5&_wpnonce=67fdf1328g&_wp_http_referer=%2Fwp-admin%2Fedit.php%3Fpost_type%3DCPT%26author%3D5&action=trash&m=0&cat=0&paged=1&post%5B%5D=9462&post%5B%5D=7093&action2=-1
So changing post_type=Array to post_type=CPT (CPT = name of custom post type) in the adress bar of the browser does the job.
But I can't find any bugs nor in my CPT neither in my theme functions.php, so the reason must be somewhere else...
First of all thank you for helping me. I solved this problem but I dont understand what the problem was. First I removed all the folders of wordpress installation and upload an old backup of my website but the problem was still there. Then I start deleting one by one all the plugins and after each deletion I was checking the behaviour, finally when I deleted this plugin WP Super Cache (which by the way was deactivated) everything worked perfect. The strange think is that when I restore all folders of the wordpress installation the plugin was there but the problem was gone... So even thought the problem is gone I am not sure for the solution.
My suggestion to anyone with the same problem: Delete plugins not just deactivate.

WordPress admin area search not working

Currently I have an installation of WordPress that is running a plugin called Types. When I search for posts inside a custom post type I get no results at all. The URL string looks correct:
&action=-1&m=0&seo_filter&paged=1&mode=list&action2=-1
But it returns nothing.
Additionally, when I remove &action=-1, the search results show up correctly. I have tried disabling the plugin and it works correctly, however I have other sites using the same plugin and searching works on these.
Does anyone have any ideas on how to fix this?
Read - Yoast's guide on integrating Gravity Forms to realise the greatness of this plugin.
It has a paid limitation on assigning role capabilities to custom post types which can be partially fulfilled with http://wordpress.org/plugins/map-cap/
It would probably be best asking the plugin developer in the WP Support forum.
http://wordpress.org/support/plugin/types

Advanced Custom Fields not saving at all now

I downloaded and installed Advanced Custom Fields 4.1.6 the other day and I used it a few times for some time and it worked perfectly, but for some reason now none of my custom fields seem to be saving and I'm not getting any errors or anything. I don't think that I have done anything at all that could have possibly broken this.
Has this happened to anyone else? And what could possibly be the issue?
I think you might have to take a look at export function the plugin provides. Select a field group you created and hit export. It'll generate some code which is pretty good commented with tips and advice. There might be some information there for good use for 'ya.
Example by the plugin developer:
Include in theme
The Advanced Custom Fields plugin can be included within a theme. To do so, move the ACF plugin inside your theme and add the following code to your functions.php file:
include_once('advanced-custom-fields/acf.php');
To remove all visual interfaces from the ACF plugin, you can use a constant to enable lite mode. Add the following code to your functions.php file before the include_once code:
define( 'ACF_LITE', true );
Hope it helps.
/Paul
Since my rep isn't high enough to reply to #Kortschot's response, I'll comment here.
I got this error while testing a new theme. It appears the theme has ACF bundled into the theme, which triggers the "Cannot redeclare acf_filter_post_id()" error. For obvious reasons (you can't run two instances of the plugin in the same install). #Kortschot's reference to including ACF in a theme helped solve my problem.
Now I have to figure out how to access ACF if I want to customize fields on pages/posts...
I'm gonna go ahead and reply to this old question in hopes that it helps someone out. I have been having this problem where my fields would not update on my custom posts. I usually have multiple tabs open to make navigation easier in the backend of WP. It turns out that when I closed all other tabs except the current one I'm editing, the fields update every time!
I have same problem with Advanced custom fields plugin , i resolve my issue by adding one line code in advanced-custom-fields/core/controllers/post.php
add_action('pre_post_update', array($this, 'save_post'));
after
add_action('save_post',array($this, 'save_post'), 10, 1);
line number 33, 34.
I had the same problem and fixed it by creating unique field names.

Resources