Woocommerce Checkout Page Internal Server Error

I’ve added the FTP account info above in the secure note. I may need to whitelist your IP though. I’ve also set WP_DEBUG and WP_DEBUG_LOG to true as well.

Thank you for your assistance. I hope we can figure out what went wrong soon as I need to get this working again for additional testing/training.

Hi,

I would like to check further but the ftp login provided is not working.

Do you mind deactivating ip restriction for a while so we can check.

Thanks

Good morning Paul. Unfortunately our hosting company doesn’t allow its users to disable the firewall, but I can whitelist you IP address. If you provide that I can whitelist it for today.

Hi @MPP_dshoales,

Unfortunately, we are from different places with varying IP addresses. We can give you our IPs but it will be different the next we check it. It will be a lot of back and forth and probably we’ll not able to check it at all.

Disabling it is more recommended.

Thanks!

We are on a shared hosting environment and the hosting company is unwilling to disable the FTP firewall as that would expose everyone in the environment beyond our site. Unfortunately providing a range of IP addresses this is the only solution they are able to accomodate.

Would uninstalling and reinstalling the Woocommerce plugin be a fix that would work for this? I’d love to isolate the exact cause of this issue incase it’s something that needs to be fixed in an update, but I don’t have the available time due to the site’s locked in launch date.

Edit: I’ll be monitoring for any response tonight. I will try to get any IP addresses Whitelisted as soon as possible after notification.

Hello There,

Since we do no have ftp access, could you please provide us the contents of your child theme’s functions.php file? We need to check it because according to the error, there is a fatal error originated from one of the functions added in the file.
Please post in your next reply the whole content code of the functions.php file.

Thank you in advance.

Here is the content of the Child themes functions.php:

<?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Overwrite or add your own custom functions to Pro in this file. // ============================================================================= // ============================================================================= // TABLE OF CONTENTS // ----------------------------------------------------------------------------- // 01. Enqueue Parent Stylesheet // 02. Additional Functions // ============================================================================= // Enqueue Parent Stylesheet // ============================================================================= add_filter( 'x_enqueue_parent_stylesheet', '__return_true' ); // Additional Functions // ============================================================================= function x_get_content_layout() { $content_layout = x_get_option( 'x_layout_content' ); if ( $content_layout != 'full-width' ) { if ( is_home() ) { $opt = x_get_option( 'x_blog_layout' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( is_singular( 'post' ) ) { $meta = get_post_meta( get_the_ID(), '_x_post_layout', true ); $layout = ( $meta == 'on' ) ? 'full-width' : $content_layout; } elseif ( x_is_portfolio_item() ) { $layout = 'full-width'; } elseif ( x_is_portfolio() ) { $meta = get_post_meta( get_the_ID(), '_x_portfolio_layout', true ); $layout = ( $meta == 'sidebar' ) ? $content_layout : $meta; } elseif ( is_page_template( 'template-layout-content-sidebar.php' ) ) { $layout = 'content-sidebar'; } elseif ( is_page_template( 'template-layout-sidebar-content.php' ) ) { $layout = 'sidebar-content'; } elseif ( is_page_template( 'template-layout-full-width.php' ) ) { $layout = 'full-width'; } elseif ( is_archive() ) { if ( x_is_shop() || x_is_product_category() || x_is_product_tag() ) { $opt = x_get_option( 'x_woocommerce_shop_layout_content' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } else { $opt = x_get_option( 'x_archive_layout' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } } elseif ( x_is_product() ) { $layout = 'sidebar-content'; } elseif ( x_is_bbpress() ) { $opt = x_get_option( 'x_bbpress_layout_content' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( x_is_buddypress() ) { $opt = x_get_option( 'x_buddypress_layout_content' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( is_404() ) { $layout = 'full-width'; } else { $layout = $content_layout; } } else { $layout = $content_layout; if ( x_is_product() ) { $layout = 'sidebar-content'; } } return $layout; } add_filter( 'ups_sidebar', 'x_woocommerce_sidebar' ); function x_woocommerce_sidebar($sidebar){ if( x_is_product_category() || x_is_product()){ return 'ups-sidebar-woocommerce_sidebar'; } return $sidebar; }

Hello There,

Please remove this first:

function x_get_content_layout() {

    $content_layout = x_get_option( 'x_layout_content' );

    if ( $content_layout != 'full-width' ) {
      if ( is_home() ) {
        $opt    = x_get_option( 'x_blog_layout' );
        $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
      } elseif ( is_singular( 'post' ) ) {
        $meta   = get_post_meta( get_the_ID(), '_x_post_layout', true );
        $layout = ( $meta == 'on' ) ? 'full-width' : $content_layout;
      } elseif ( x_is_portfolio_item() ) {
        $layout = 'full-width';
      } elseif ( x_is_portfolio() ) {
        $meta   = get_post_meta( get_the_ID(), '_x_portfolio_layout', true );
        $layout = ( $meta == 'sidebar' ) ? $content_layout : $meta;
      } elseif ( is_page_template( 'template-layout-content-sidebar.php' ) ) {
        $layout = 'content-sidebar';
      } elseif ( is_page_template( 'template-layout-sidebar-content.php' ) ) {
        $layout = 'sidebar-content';
      } elseif ( is_page_template( 'template-layout-full-width.php' ) ) {
        $layout = 'full-width';
      } elseif ( is_archive() ) {
        if ( x_is_shop() || x_is_product_category() || x_is_product_tag() ) {
          $opt    = x_get_option( 'x_woocommerce_shop_layout_content' );
          $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
        } else {
          $opt    = x_get_option( 'x_archive_layout' );
          $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
        }
      } elseif ( x_is_product() ) {
        $layout = 'sidebar-content';
      } elseif ( x_is_bbpress() ) {
        $opt    = x_get_option( 'x_bbpress_layout_content' );
        $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
      } elseif ( x_is_buddypress() ) {
        $opt    = x_get_option( 'x_buddypress_layout_content' );
        $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
      } elseif ( is_404() ) {
        $layout = 'full-width';
      } else {
        $layout = $content_layout;
      }
    } else {
      $layout = $content_layout;
      if ( x_is_product() ) {
        $layout = 'sidebar-content';
      } 
    }

    return $layout;

}

//add_filter( 'ups_sidebar', 'x_woocommerce_sidebar' );
function x_woocommerce_sidebar($sidebar){
if( x_is_product_category() || x_is_product()){
return 'ups-sidebar-woocommerce_sidebar';
}
return $sidebar;
}

We need to test whether one of this lines is causing the issue or not. We will know that it has some errors in it when the check out page will display without the error 500.

Please let us know how it goes.

I removed the lines as requested from the child-themes functions.php file, and unfortunately I’m still getting the 500 Internal Server error.

Hey There,

Since you removed the code, what is the error message displayed in the error log now?
Could you please share it?

Thanks.

This is the error.log from 09/28.

[28-Sep-2018 03:38:44 UTC] PHP Notice: id was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(’/themes/pro/woocommerce.php’), x_get_view, X_View_Router::render, include(’/themes/pro/framework/views/icon/woocommerce.php’), woocommerce_content, wc_get_template_part, load_template, require(’/plugins/woocommerce/templates/content-single-product.php’), do_action(‘woocommerce_after_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_output_product_data_tabs, wc_get_template, include(’/themes/pro/woocommerce/single-product/tabs/tabs.php’), comments_template, require(’/themes/pro/woocommerce/single-product-reviews.php’), WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This message was added in version 3.0.) in /chroot/home/itsacrui/dev.itsacruisego.com/html/wp-includes/functions.php on line 4161
[28-Sep-2018 03:38:46 UTC] PHP Notice: id was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(’/themes/pro/woocommerce.php’), x_get_view, X_View_Router::render, include(’/themes/pro/framework/views/icon/woocommerce.php’), woocommerce_content, wc_get_template_part, load_template, require(’/plugins/woocommerce/templates/content-single-product.php’), do_action(‘woocommerce_after_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_output_product_data_tabs, wc_get_template, include(’/themes/pro/woocommerce/single-product/tabs/tabs.php’), comments_template, require(’/themes/pro/woocommerce/single-product-reviews.php’), WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This message was added in version 3.0.) in /chroot/home/itsacrui/dev.itsacruisego.com/html/wp-includes/functions.php on line 4161
[28-Sep-2018 04:17:49 UTC] PHP Notice: MemcachePool::getstats(): Server localhost (tcp 11211, udp 0) failed with: Connection refused (111) in /chroot/home/itsacrui/dev.itsacruisego.com/html/wp-content/plugins/wp-serverinfo/wp-serverinfo.php on line 252
[28-Sep-2018 04:18:29 UTC] PHP Notice: MemcachePool::getstats(): Server localhost (tcp 11211, udp 0) failed with: Connection refused (111) in /chroot/home/itsacrui/dev.itsacruisego.com/html/wp-content/plugins/wp-serverinfo/wp-serverinfo.php on line 252

Hi,

I tried creating a new checkout page and assigned it in woocommerce.

It seems to work without any issues.

https://dev.itsacruisego.com/checkout1/

Kindly check in your end.

Thanks

Hello,

From the looks of it @paul.r , you just dropped the shortcode into a non-Pro designed page which, as I stated above in the comment from 3d ago,

Edit: I also forgot to mention that the shortcode works if I place it in a default page without an Pro editing done to it. The page breaks only when I’ve edited the page in Pro.

Previously I had designed the page in Pro with the shortcode for checkout used in a row as I’ve done with the My Account, Shopping Cart and other WooCommerce pages and it worked fine.

The checkout shortcode worked previously in that Pro designed page, but now it does not. I’ve updated Pro and several other plugins since the last time I tested the site so I am not sure what has broken the checkout shortcode.

If I have to now use a non designed page then that’s that, but I’m extremely frustrated as the Checkout page worked before when I designed it like the other WooCommerce pages. So I’d like to know why I now cannot design the page where before it worked without problems.

Hi,

I understand your frustration but it’s hard to debug this without ftp access.

I can see you have Woocommerce Version 3.4.4 but the latest supported version is Version 3.4.2

I tried on my test sites with woocommerce version 3.4.2 using pro builder and adding the woocommerce checkout shortcode in raw content element but this error is not happening. I also tried adding other elements and still did not get an error.

Can you try downgrading your woocommerce to that version and see if that helps

https://github.com/woocommerce/woocommerce/archive/3.4.2.zip

Thanks

I can try that.

I pointed this out in different topic, but the 3.4.4 version is installed by the WooCommerce installer in the Pro theme options section. It’s very odd in the supported version is 3.4.2 but the installer is installing a later version.

I downgraded to 3.4.2 of WooCommerce and the issue is persisting still.

There must be something wrong with my installation of Pro. I tried to open your designed page and I get the Internal Server error. If I trash that page and create a standard Wordpress page with just the shortcode, it works fine. When I then try to design the page in Pro, I can design it but after saving it the page gets the Internal Server error.

Edit 1: I attempted to switch from the Pro Child theme to the original Pro theme and the Internal Server error persists. Can I safely uninstall and re-install Pro without losing the page content I’ve already created?

Hello @MPP_dshoales,

Thanks for updating the thread. :slight_smile:

Yes, when you install WooCommerce from Pro > Validation > Extensions it will install latest version of the WooCommerce. So you can install supported version by downloading the package from following source.

Looks like you have updated the thread and have downgraded WooCommerce.

Internal Server error message can cause because of multiple reasons. You can take a look at some of the solutions mentioned in following article.

https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-internal-server-error-in-wordpress/

You can uninstall Pro Theme and then reinstall the same. There won’t be any issue with the page content and content won’t get deleted.

Let us know how it goes.

Thanks.

Rather than continue with triaging the Internal 500 error, due to the launch date next week we’re moving forward with the basic Wordpress page with just the shortcode. I was able to use CSS to make a few changes to bring it inline design-wise. I appreciate the effort and sorry that we couldn’t identify the root cause of why the shortcode wouldn’t work in a Pro designed page anymore.

Hey There,

Thanks for letting us know that you have gone to a different solution for your checkout page.
If you need anything else we can help you with, don’t hesitate to open another thread.

Thank you for your understanding.

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