Checkout page 500 error!

I’ve reset your htaccess and your checkout now works.

There are htaccess rules added by WP Rocket and I also see a custom rule. If you encounter this issue again, please contact your host or hire a server admin to setup them up correctly.

This wasn’t a theme issue. I understand you switched to the default theme and it worked most probably because of caching being cleared or something reset in WordPress during the theme switch. But, the original cause is the custom htaccess rules.

Thanks.

Hey @christian_y,

You are on the wrong website. The website containing the issue is www.stiickzz.pro not www.stiickzz.com. Please look at the links I provided on my initial post.
The cPanel as well as Wordpress login credentials I provided were for the site stiickzz.pro as well so if so far you guys changed something it still didn’t fix it :confused:

Hello There,

Thanks for updating in! I am another staff checking in your site. There is something going on with your checkout page. I do not know what it is. I already did the following:
1.) I edited the error 500.shtml in your server and as soon as I check the checkout page, it is still displaying the same error page with out my changes in it.

2.) I created an X test page and used it as the Check out page. It just works with the [woocommerce_checkout] shortcode in it. It just works like this:

Here’s what I want you to do:
1.) Please edit your check out page in Cornerstone and save it as a block or page template.
2.) Delete your check out page.
3.) Please make sure that in your page trash (https://stiickzz.pro/wp-admin/edit.php?post_status=trash&post_type=page) it is also deleted.
4.) Create a new page Check Out and use the simple [woocommerce_checkout] shortcode first and test it.
5.) Once it displays, you can re edit it again and make use of the previously saved template and do another round of test.

Please let us know how it goes.

Hi @RueNel !

Thanks a lot for having a look into this issue.
Unfortunately deleting the page and just inserting the shortcode didn’t work. As soon as I implement the checkout shortcode into the page, it is broken. If I take it out again it works completely fine.
Inside of the Pro page editor the checkout page layout loads completely fine, however as soon as you want to access the page directly, you get the error again.

I’ve done some further testing and tried to implement the shortcode in various ways. I tried implementing it using the Text, Content Area, Classic Text and Classic Raw Content element. With all of those elements I still get the error.
The only difference I noticed is that when you use the brand new Content Area element, Woocommerce doesn’t register that the shortcode was implemented on the site. So if you go to the Woocommerce status under ‘WC Pages’, for Checkout it says ’ Page ID is set, but the page does not exist’ although the shortcode was implemented.
That doesn’t really have anything to do with the issue, because if I use the classice raw content element woocommerce properly registers that I successfully implemented the shortcode, yet I still get the same error.
I just thought I should mention this as this might be something you guys want to fix in the future.

Besides trying to implement the shortcode with different elements in the Pro edtior I’ve also tried to implement it through the standard Wordpress Text editor. So what I did was, I deleted the checkout page, created a new one and inserted the shortcode in the Text editor. After doing that the checkout page loads properly and works fine. As soon as I press on the ‘Edit with Pro’ button and save the page through the Pro editor. The page is broken again. Even if I go back to the text Editor and try to re-save it from there.

This makes me believe that the issue might not necessarily be the Pro theme itself, but rather just an issue between the Pro Editor and that Checkout shortcode. As mentioned in my first post, as soon as I switch the entire theme, the checkout page works perfectly fine. I don’t have too much knowledge about code but I do assume that when I switch the theme off it also turns off the Pro Editor, and with the checkout page working when I insert the shortcode through the standard Text editor even if the Pro theme is active, really makes me believe that the issue might just be the Pro editor.

I hope this little research helps in some way to fix this issue.
I really do appreciate you guys trying to help me out! :slight_smile:

Hi there,

Please check it again. You should let Woocommerce create the pages it needs. Under Woocommerce > Status, there is Create Pages button, I went ahead and created them.

You’re getting page no ID message is because the pages aren’t created yet.

Plus, I ddn’t get the 500 error while Checkout Editor plugin is active. And please don’t edit the checkout page, let it be the default display. Maybe Woocommerce has a different way of handling it especially the templates.

Thanks!

Sorry about that. I checked again and I did not experience the 500 error but instead clicking checkout redirects back to the home page. So I deleted the page with the checkout shortcode then went to WooCommerce > Settings > Checkout and set your Checkout as WC Checkout page. And, I get this https://youtu.be/wQT-s821oMM. The issue is not 500 error anymore but the layout. I’m not sure why it’s full width. I tried restoring your previous htaccess but it made no difference. The last error log I see is this:

[28-Oct-2017 09:03:41 America/Chicago] PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0

Could you try setting up another staging server with just Pro and WooCommerce to see if this also happens and if it doesn’t, we’ll have a setup to compare to.

Hey @Rad

I haven’t let Woocommerce create any of it’s pages automatically. As long as you manually insert the Shortcode somewhere on your website, Woocommerce recognizes that page and under status will give it the proper page ID.
But if you use the new Content Area element to insert the Shortcode, Woocommerce can’t seem to automatically find the Shortcode anywehre on the site.
But that isn’t even the issue. As I said, I just htought I’d mention this as this might be something to fix in the future.

@christian_y
The reason why the 500 error disappeared and the Checkout page is now full width is because as mentioned in my last post, I inserted the checkout Shortcode through the standard WordPress Text editor instead of using the Pro editor.
That’s why I mentioned that I believe that the issue might not be the theme but rather just the Pro editor.
I’ve now inserted the code again through the Pro editor, the same way I inserted the Cart shortcode, My Account shortcode etc. And now we’re once again back with the 500 error.

Hi,

I tried exact same settings in my test sites but did not get an error 500.

Woocommerce version 2.3.2
Woo Checkout Editor Vesion 2.0.1
Added woo checkout shortcode in PRO Editor

There is something in your site that is preventing it from working.

Can you create a staging site so we can freely debug and test without causing any issue to your live site.

Thanks

You guys can feel free to do all sorts of testing on the site right now. It’s not an actual live site yet and has no visitors.

Hello There,

I have spent several hours looking into this issue. No matter what I do, I could not find the error log. This file should be found somewhere and holds the key to what the cause of the error 500 in your check out. I have check the theme files, php settings, htaccess and even used default theme. The only time error 500 will appear is if it renders the [woocommerce_checkout] shortcode. I am not sure if this is because of the theme function or what so ever. Maybe it’s time we ask assistance from your hosting provider to locate the error log file. I have checked your the log files I could find and not of those displays the current date. Maybe you could ask them about this error 500 on the checkout page and ask for advise where we can find the error log or somewhow they can give us the error messages for the page.

Hoping to get a reply soon.

Thanks for taking the time to investigate this issue @RueNel

I’ve contacted my hosting support already before I even created this post here. I’ve spend multiple hours with different support members and even tier 2 support members. All of them couldn’t fix this issue.
Simply because the issue disappears once I select another theme and not the Pro theme, I always got advised to contact you guys here as they assumed that it’s an issue with the theme and not an issue with the servers.

This issue is slowly driving me crazy… it’s been 2-3 weeks already since I wanted to launch that site but I’m not able to due to this annoying issue :confused:
Right now it seems like the only way to fix this would be to switch to another theme but I personally really love the Pro theme which is why I hope that you guys can help me fix this asap.

Hi there,

You mean another has content area element too and when you switch the theme it works? Woocommerce checkout shortcode is supposed to be added alone in the editor and not with the builder for the reason that it’s the hook to let Woocommerce that it’s one of its default pages.

The issue here is not the theme or server, but the combination of shortcodes and it usually happens in Wordpress. Let’s take this a sample,

add_filter('the_content', 'share_me');

function share_me ( $content ) {

return $content.do_shortcode('blah bla blah ..... so on');

}

This could actually cause internal server error since it can create loops. The the_content itself has do_shortcode() and you’re calling another do_shortcode() within it.

In the builder, all element with text processing as do_shortcode() to allow shortcode processing within the content, all editor are supposed to have do_shortcode(), else, your added shortcode will not be executed.

Now, [woocommerce_checkout] has many filters and hooks, and internal shortcodes as well. Calling it with content is the element or any text element will result in 500 internal server error.

Then we have 3 options

  1. When you said fix it on the builder side, then remove do_shortcode in all type of text element, but doing that will remove the shortcode capability of the editor (example, [acf field="name"] will stay [acf field="name"] instead of displaying the value of that shortcode.

  2. Remove the filter, hooks, and internal shortcodes or Woocommerce’s [woocommerce_checkout] but that will kill the real purpose of the checkout page

  3. Don’t use the builder in Woocommerce’s default pages.

BUT these are just assuming that the issue is related to the builder and [woocommerce_checkout] since your reply to me and Christian is a bit confusing:

As long as you manually insert the Shortcode somewhere on your website, Woocommerce recognizes that page and under status will give it the proper page ID.
But if you use the new Content Area element to insert the Shortcode, Woocommerce can’t seem to automatically find the Shortcode anywehre on the site.

  • Does that mean it works in PRO (no 500 internal server error ) and just can’t recognize the shortcode, then you said:

The reason why the 500 error disappeared and the Checkout page is now full width is because as mentioned in my last post, I inserted the checkout Shortcode through the standard WordPress Text editor instead of using the Pro editor.

I checked again your woocommerce’s checkout pages and I’m not getting any 500 internal server error. But, I’ll continue checking.

Thanks!

1 Like

Hey @Rad,

I was just checking in as you said that the checkout page has no internal error anymore but for some reason the entire website has an Internal Error now :open_mouth:

Are you sure you are on the correct website ? I believe Christian once also thought the issue was solved however, he was also just on the wrong website. The website with the issue is stiickzz.pro not stiickzz.com

Also, since I didn’t touch the website since my last post 2 days ago, where the site was still working completely fine except for the checkout page) I assume one of you guys changed some stuff in the server files which causes the internal error throughout the whole site.

HI there,

Have you done some changes or is it the cache? I’m pretty sure it’s the correct one even on my first reply on this thread (I read your reply to Christian about that). Maybe you can switch to another hosting testing? But regardless, your only option is not to use checkout shortcode in the builder.

And we’re not changing anything, there is no need to change when we’ll just need to do is check the checkout page in the front. The only change that I did was generating default pages for woocommerce but that was my first reply and it’s been 6 days.

Please contact your hosting provider and get some error log to see what’s causing it.

Thanks!

This is the error I’m getting currently. How are you able to access the website ?

Also, so you are saying that just letting Woocommerce generating the sites itself should fix the issue?
Because the last time I fully deleted the checkout page and let it generate through Woocommerce it didn’t fix the issue at all.
If possible, you could even log into the site and test that out to see that it is not working unfortunetly :confused:

Hi there,

That’s what I want to know too, have you done some changes? The debug.log is just generated today and looks like it’s recent. Plus, some files are updated today, have you updated them?

Another problem is your site can’t generate error logs due to permission. I tried to capture it with Wordpress debug log and it can’t.

But since you provided your CPANEL, I went ahead and did some manual debugging and found out that the error is because of your Woocommerce plugin itself. I renamed its folder through CPANEL’s File manager to disable it, so you may access it now. Have you recently updated it? Please install new Woocommerce.

And NO, I didn’t say deleting it will fix it, I said regenerating the pages will create default pages required by Woocommerce because you said you’re getting page no ID message. And I said there was no internal server error when I checked it :slight_smile:

Thanks!

Hey @Rad

As I said, I’m pretty sure I didn’t change anything for the past few days.
I want to reinstall Woocommerce now as you said but when I try to access the plugins section of the wordpress dashboard I get a page not found message.

Is it maybe possible to chat with you through Facebook? That way we could maybe take a few minutes to have a more detailed look into this issue and whenever you need information from me I can provide them in seconds. Through this forum it’s taking quite some time to solve this issue. I mean it’s been 15 days already. Thanks in advance !

EDIT: I just found out why the entire site had the internal error for a while and why the plugins & themes page in the dashboard would show a page not found error. Somehow someone changed the php version from 7.1 to 5.6. I changed it back to 7.1 again which makes the site work again however, the 500 internal error on the checkout page still remains.

Hey Guys!

I just wanted to let you know that I managed to find a way around this issue.
I didn’t really manage to fix it but what I did was I saved the checkout template inside of Pro from my older Website which was still using some classic sections and classic elements. I then loaded that Template into my new website where I had the issue. This seems to work for now.

Thanks a lot for the help. I really appreciate you guys taking the time over the past 2 weeks to help me with this issue.

Hey There,

You’re most welcome.
Glad we were able to assist you in anyway we can. It’s a good thing you also understand that some issues take a careful investigation and takes time to get resolved.

Best Regards.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.