• Resolved markenm

    (@markenm)


    I’ve started receiving an error message under Woocommerce > Status and all of the products have started intermittently experiencing 504 Errors.

    I think that the error relates to the theme but unfortunately the theme provider no longer offers updates or support, so there’s no fix coming and no help from them.

    What I really need is a quick fix to tide me over until I can replace the theme entirely. Can anyone help me out.

    The full error message is:
    Error Details
    =============
    An error of type E_ERROR was caused in line 87 of the file /home/xxx/public_html/xxx/wp-content/themes/avery/inc/update.php. Error message: Uncaught Error: Call to undefined function prepare_request() in /home/xxx/public_html/xxx/wp-content/themes/avery/inc/update.php:87
    Stack trace:
    #0 /home/xxx/public_html/xxx/wp-includes/class-wp-hook.php(286): my_theme_api_call(false, ‘theme_informati…’, Object(stdClass))
    #1 /home/xxx/public_html/xxx/wp-includes/plugin.php(208): WP_Hook->apply_filters(false, Array)
    #2 /home/xxx/public_html/xxx/wp-admin/includes/theme.php(480): apply_filters(‘themes_api’, false, ‘theme_informati…’, Object(stdClass))
    #3 /home/xxx/public_html/xxx/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-status.php(244): themes_api(‘theme_informati…’, Object(stdClass))
    #4 /home/xxx/public_html/xxx/wp-content/plugins/woocommerce/includes/api/v2/class-wc-rest-system-status-v2-controller.php(944): WC_Admin_Status::get_latest_theme_version(Object(WP_Theme))
    #5 /home/xxx/public_html/xxx/w

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Hi @markenm,

    That first error Uncaught Error: Call to undefined function prepare_request() says that in the avery/inc/update.php file on line 87 it’s trying to us a function that doesn’t exist.

    I’m not sure what that update file does in Avery, but it doesn’t seem to be necessarily causing the 504. At least from what I can see. First though, it seems Avery is still in development and you could get updates and support for it from this site. –> https://www.simplethemes.com/wordpress-themes/theme/avery

    Back to 504 land, from my side I can’t tell or see what is causing it. Alongside double checking that you can’t get Avery updated, or report that error to the theme developer, as your host if they have any evidence/logs of what is causing the 504. Perhaps they are related, but your host should know more. ??

    Let us know what you find, thanks!

    Thread Starter markenm

    (@markenm)

    Simple themes is where I got the theme from in the first place and he started ignoring help requests a couple of years ago and there haven’t been any updates in just as long.

    I also spoke with my hosts who said:

    “We were able to replicate the problem and strace the process. It appears that there is a very very large self-referring requests, which the application generates. You can check the entire trace file here:

    We tried using different PHP versions, we ensured that all files/folders have correct permissions and we cleared all cache on the server. However, I am afraid that nothing worked. We also do not see any error logs on the server indicating problems with the server environment. It is best to consult with the website developers for further assistance”

    Unfortunately for me… im the developer so I cant help myself…

    Thread Starter markenm

    (@markenm)

    So I’ve ‘commented out’ the section in the update.php file, which seems to have fixed the fatal error when access WooCommerce > Status, but I’m still getting 504 errors when I try to enter product pages.

    The entire website, from core pages, to CPT posts to the main shop page all work perfectly and load within seconds, but 9 times out of 10, when I click a on a product I get a 504 error.

    Plugin Support Fernando a11n

    (@fhaps)

    Automattic Happiness Engineer

    there is a very very large self-referring requests, which the application generates. You can check the entire trace file here:

    I’m guessing you removed details from the message, for clarity here. But, does that trace file give you any clues about where could the request be generating from?

    Given what they say, about the large request being made, I’m guessing this could be a request generated by a plugin on your site, which only kicks in when opening product pages. You may want to test disabling all plugins except for WooCommerce, and temporarily enabling the Storefront theme, and see if the 504 errors still happen under that default setup.

    It might be that a plugin is causing this unnecessary burden on the server that leads to the 504 errors.

    Plugin Support Fernando a11n

    (@fhaps)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error: Uncaught Error: Call to undefined function prepare_request()’ is closed to new replies.