• Hello, after updating my server to PHP version 8.3 and SQL version to 8, I get the following errors in my log:

    [10-May-2024 11:57:41 UTC] PHP Fatal error: Uncaught Error: Unknown named parameter $uniqid in /public_html/wp-includes/class-wp-hook.php:324
    Stack trace: 0 /public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 1 /public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array) 2 /public_html/wp-cron.php(191): do_action_ref_array(‘woocommerce_car…’, Array) 3 {main}

    thrown in /public_html/wp-includes/class-wp-hook.php on line 324
    [10-May-2024 12:14:03 UTC] PHP Fatal error: Uncaught Error: Unknown named parameter $uniqid in /public_html/wp-includes/class-wp-hook.php:324
    Stack trace: 0 /public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 1 /public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array) 2 /public_html/wp-cron.php(191): do_action_ref_array(‘wc_admin_proces…’, Array) 3 {main}

    thrown in /home/cursosbajoprecio/public_html/wp-includes/class-wp-hook.php on line 324
    [10-May-2024 12:34:29 UTC] PHP Warning: Attempt to read property “post_type” on null in /public_html/wp-content/plugins/header-footer-elementor/inc/lib/target-rule/class-astra-target-rules-fields.php on line 1335
    [10-May-2024 12:34:29 UTC] PHP Warning: Attempt to read property “ID” on null in /public_html/wp-content/plugins/header-footer-elementor/inc/lib/target-rule/class-astra-target-rules-fields.php on line 1336
    [10-May-2024 12:34:31 UTC] PHP Warning: Attempt to read property “post_type” on null in /public_html/wp-content/plugins/header-footer-elementor/inc/lib/target-rule/class-astra-target-rules-fields.php on line 1335
    [10-May-2024 12:34:31 UTC] PHP Warning: Attempt to read property “ID” on null in public_html/wp-content/plugins/header-footer-elementor/inc/lib/target-rule/class-astra-target-rules-fields.php on line 1336

    [10-May-2024 12:43:51 UTC] PHP Warning: Undefined property: stdClass::$table_name in /public_html/wp-content/plugins/wp-rocket/inc/Engine/Admin/Database/OptimizationProcess.php on line 131 [10-May-2024 12:43:51 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1 for query OPTIMIZE TABLE made by do_action(‘wp_ajax_rocket_database_optimization’), WP_Hook->do_action, WP_Hook->apply_filters, WP_Rocket_WP_Background_Process->maybe_handle, WP_Rocket_WP_Background_Process->handle, WP_Rocket\Engine\Admin\Database\OptimizationProcess->task [10-May-2024 12:43:51 UTC] PHP Warning: Undefined property: stdClass::$table_name in /public_html/wp-content/plugins/wp-rocket/inc/Engine/Admin/Database/OptimizationProcess.php on line 131 [10-May-2024 12:43:51 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1 for query OPTIMIZE TABLE made by do_action(‘wp_ajax_rocket_database_optimization’), WP_Hook->do_action, WP_Hook->apply_filters, WP_Rocket_WP_Background_Process->maybe_handle, WP_Rocket_WP_Background_Process->handle, WP_Rocket\Engine\Admin\Database\OptimizationProcess->task

    I would greatly appreciate some help please.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Most of the messages seem to be caused by the plugins you are using. These are apparently not yet compatible with PHP 8.3. I would recommend that you switch to PHP 8.2 or even 8.1. Unfortunately, many plugin developers still need some time to adapt their plugins to newer PHP versions.

    WordPress itself is not yet fully compatible with PHP 8.3, it is referred to as “beta support”. See: https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/

    Thread Starter davidgimenez

    (@davidgimenez)

    That was faster than you thought of mentioning changing version, that problem appears in all versions from 8.0 and up only and they are not plugin problems because I studied with each developer of each plugin that I have and they are all compatible with version 8.3 of PHP like this Please do a little more research before releasing as quickly as possible to give a quick and not good solution with all due respect but the complements are not a problem

    Which WordPress version are you using? In the latest version, for example, the $uniqid variable mentioned in the error messages is not present in the one single line from the core: https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-hook.php#L324

    For the vast majority of other messages, I continue to suspect a content-related problem with data records in the database that the respective plugins are trying to use. Their developers should be able to explain why this is happening. You are welcome to link your topics in their support forums, where they have contradicted this, here so that you can get a better overview of what has already been analysed. Apart from the first 2 reports, not even WordPress core files are named as the cause.

    Thread Starter davidgimenez

    (@davidgimenez)

    I am using the latest version of WordPress with PHP version 8.2 and SQL version 8 and all plugins updated and compatible with that version of PHP.

    Thread Starter davidgimenez

    (@davidgimenez)

    These errors are not caused by my plugins because I deactivated them all and I get those errors because I don’t even have those plugins installed, therefore it is a wordpress error. I use PHP version 8.2 with SQL version 8 database

    [13-May-2024 06:02:38 UTC] PHP Fatal error: Uncaught Error: Unknown named parameter $uniqid in /public_html/wp-includes/class-wp-hook.php:324
    Stack trace: 0 /public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 1 /public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array) 2 /public_html/wp-cron.php(191): do_action_ref_array(‘jetpack_v2_hear…’, Array) 3 {main}

    thrown in /public_html/wp-includes/class-wp-hook.php on line 324

    [13-May-2024 06:13:33 UTC] PHP Fatal error: Uncaught Error: Unknown named parameter $uniqid in /public_html/wp-includes/class-wp-hook.php:324
    Stack trace: 0 /public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 1 /public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array) 2 /public_html/wp-cron.php(191): do_action_ref_array(‘wc_admin_proces…’, Array) 3 {main}

    thrown in /public_html/wp-includes/class-wp-hook.php on line 324

    [13-May-2024 07:30:39 UTC] PHP Fatal error: Uncaught Error: Unknown named parameter $uniqid in /public_html/wp-includes/class-wp-hook.php:324
    Stack trace: 0 /public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 1 /public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array) 2 /public_html/wp-cron.php(191): do_action_ref_array(‘recovery_mode_c…’, Array) 3 {main}

    thrown in /public_html/wp-includes/class-wp-hook.php on line 324

    threadi

    (@threadi)

    Your 1st example is initialised by a jetpack hook.

    Your 2nd example is initialised by a WooCommerce hook.

    Your 3rd example is initialised by the hook of a hook called “recovery_mode_c..”, which I cannot identify. This does not exist in WordPress.

    In all 3 cases, the hooks are apparently being used incorrectly, resulting in a subsequent error in WordPress core files. However, the actual cause is the execution of these plugin-specific hooks.

    If you have deactivated all plugins and these hooks are still being executed, take a look at your theme. If necessary, switch to a standard theme.

    Also check whether you have a must-use plugin. These can be found in the /wp-content/mu-plugins/ directory.

    If you have previously used a cache plugin, also check whether its cache has really been deactivated. Unfortunately, there are plugins that do not do this properly.

    If you see these messages in your error log even with a standard theme and WITHOUT any plugins, check carefully whether you are looking at the right hosting. It can happen that you confuse this.

    Just a reminder: I have several projects that use various of the above plugins and have never seen such an error. As I wrote above, I am assuming a content-related error. An error in WordPress core files should be traceable in a fresh WordPress installation without any plugins and with a standard theme.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.