• Resolved webfabrik

    (@webfabrik)


    Hi,

    I have an issue with tis plugin. After I update my version of PHP language from 7.4 to 8.1. I occur this error :

    “The checked URL returned an error when fetching the assets via AJAX call. This could be because of a firewall that is blocking the AJAX call, a redirect loop or an error in the script that is retrieving the output which could be due to an incompatibility between the plugin and the WordPress setup you are using.
    Here is the response from the call:
    Status Code Error: 500 * for more information about client and server errors, check this link
    Suggestion: Select “WP Remote Post” as a method of retrieving the assets from the “Settings” page. If that doesn’t fix the issue, just use “Manage in Front-end” option which should always work and submit a ticket about your problem.”

    FYI I also use WP Rocket and Elmentor.

    I cleaned the cache, redownloaded the plugin. Still the same error.
    By returning to version 7.4 of PHP. No errors.

    Can you help me please ?`

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @webfabrik I could only guess what’s going on there. Based on my experience, there’s a piece of code there that is not working with 8.1 (is this the exact version you’re using? Perhaps it’s 8.1.12. If you can let me know that would be great. You can get this information from “Tools” – “System Info”).

    What you can do is install the “Error Log Monitor” plugin or check the error logs (if you have access to the logs) where PHP errors are stored whenever one is triggered. If you’re switching to PHP 8.1 and you will get the same 500 error, perhaps there’s a PHP error that will trigger and be saved. It should be visible within the Dashboard’s widgets (if you set up the “Error Log Monitor” plugin.

    If you could let me know the error, then I can go ahead and have this fixed. If it comes from Asset CleanUp (any PHP file from the plugin), then it can be fixed 100%. Another scenario might be a plugin incompatibility (e.g. a conflict with “Elementor” or “WP Rocket”) whenever PHP 8.1 is used.

    Thread Starter webfabrik

    (@webfabrik)

    Hello Gabe and thank you for your feedback.

    • The actual version of PHP used is 8.1.0
    • Error log: nothing relevant to your plugin or to the version of PHP.
    • I don’t think there is any conflict with Elementor or WPRocket because the error persisted after disabling these two plugins.

    Thanks.

    For more info, there is my error in the log file :

    WordPress database error Table 'xxx_wp_pro_quiz_master' doesn't exist for query
    SELECT id, name FROM xxx_wp_pro_quiz_master ORDER BY 'id'
    made by require('wp-blog-header.php'),
    require_once('wp-includes/template-loader.php'),
    include('/plugins/elementor/modules/page-templates/templates/header-footer.php'),
    get_header,
    do_action('get_header'),
    WP_Hook->do_action,
    WP_Hook->apply_filters,
    ElementorPro\Modules\ThemeBuilder\Classes\Theme_Support->get_header,
    require('/plugins/elementor-pro/modules/theme-builder/views/theme-support-header.php'),
    wp_head, do_action('wp_head'), WP_Hook->do_action,
    WP_Hook->apply_filters,
    wp_print_head_scripts, do_action('wp_print_scripts'),
    WP_Hook->do_action,
    WP_Hook->apply_filters,
    Google\Site_Kit\Core\Assets\Assets->Google\Site_Kit\Core\Assets{closure},
    Google\Site_Kit\Core\Assets\Assets->run_before_print_callbacks,
    Google\Site_Kit\Core\Assets\Assets->run_before_print_callbacks,
    Google\Site_Kit\Core\Assets\Assets->run_before_print_callbacks,
    Google\Site_Kit\Core\Assets\Assets->run_before_print_callbacks,
    Google\Site_Kit\Core\Assets\Asset->before_print, call_user_func,
    Google\Site_Kit\Core\Assets\Script_Data->Google\Site_Kit\Core\Assets{closure},
    call_user_func, Google\Site_Kit\Core\Assets\Assets->Google\Site_Kit\Core\Assets{closure},
    array_reduce,
    rest_preload_api_request,
    rest_do_request,
    rest_get_server,
    do_action('rest_api_init'),
    WP_Hook->do_action,
    WP_Hook->apply_filters,
    LearnDash_REST_API->rest_api_init,
    LD_REST_Posts_Controller_V2->register_routes,
    LD_REST_Quizzes_Controller_V2->register_fields,
    LD_REST_Quizzes_Controller_V2->register_fields_metabox,
    LearnDash_Settings_Metabox_Quiz_Admin_Data_Handling_Settings->load_settings_fields,
    LD_QuizPro::get_quiz_list fatal error: Uncaught Error: Undefined constant "php" in /home/xxx/www/wp-content/themes/xxx/footer.php
    • This reply was modified 2 years, 3 months ago by webfabrik.
    Thread Starter webfabrik

    (@webfabrik)

    FYI : I try with PHP 8.0 and I have same issue.

    Thread Starter webfabrik

    (@webfabrik)

    Hello @gabelivan

    Any update ?

    Plugin Author Gabe Livan

    (@gabelivan)

    @webfabrik can you write to me on private and provide the URL to your website? I want to check a few pages there. Please reach out through the following URL: https://www.gabelivan.com/contact/

    Thread Starter webfabrik

    (@webfabrik)

    @gabelivan : it’s done.

    Thank you.

    Plugin Author Gabe Livan

    (@gabelivan)

    @webfabrik the following error is completely unrelated to Asset CleanUp, and you need a developer to have it fixed (or you can edit the file yourself if you feel confident about it):

    fatal error: Uncaught Error: Undefined constant “php” in /home/xxx/www/wp-content/themes/xxx/footer.php

    A verification has to be added to make sure the constant does exist (e.g. it might be a different issue that the code was written in such as way that it shouldn’t have been a constant there, but it just ended up to be one by mistake).

    PHP 8+ has become pickier when it comes to old / non-functioning code and as a result, if you are having a fatal error, then the execution of the script will be halted and Asset CleanUp (and other plugins) will not process their functions anymore and you end up with the fetching error you ended up with such as: “Status Code Error: 500“.

    So, make sure there are no PHP fatal errors (ideally, any errors) there and re-test the CSS/JS manager. It should fetch the assets successfully and print them.

    Thread Starter webfabrik

    (@webfabrik)

    @gabelivan

    Thanks for your feedback. I’ll try to fixed my error. We’ll see… :). The thread can be closed.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Not working with php 8.1’ is closed to new replies.