When the plugin was upgrading, the page /wp-admin/update-core.php went blank. No page source available. No website either.
Hi,
Sorry to hear that. Must have been some edge case with your envirement or it was just a coincidence. We’ve tested the plugin in number of test sites, it’s been updated in thousands of other sites without any issues.
Thank you for the reply.
If I rename the plugin’s folder to its original name (cookie-notice) both the frontend and the backoffice go blank. So, I’m asking what should I do to eliminate the cookie-notice plugin from the data base.
Same thing here. After upgrading from v. 2.4.0 to 2.4.5, my website and WordPress went down. HTTP 500 – Internal Server Error.
Deactivating the plugin was the only solution to make my site work again. This is not good and an explanation like “some edge case with your environment or it was just a coincidence” is even worse…
Thanks for the feedback.
What would help us in understanding and fixing the issue would be the error notification or any other debug information. Can you enable WP debug mode https://wordpress.org/documentation/article/debugging-in-wordpress/ and tell us what is the exact error you get?
Same thing also happened to me.
In file error.log I’m finding lots of error messages like
PHP Fatal error: Uncaught Error: Call to undefined function wp_is_json_request() in …/wp-content/plugins/cookie-notice/includes/frontend.php:33
Stack trace:
#0 …/wp-content/plugins/cookie-notice/includes/frontend.php(52): Cookie_Notice_Frontend->is_preview_mode()
#1 …/wp-includes/class-wp-hook.php(298): Cookie_Notice_Frontend->init(”)
#2 …/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
#3 …/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#4 …/wp-settings.php(448): do_action(‘init’)
#5 …/wp-config.php(66): require_once(‘…’)
#6 …/wp-load.php(37): require_once(‘…’)
#7 …/wp-cron.php(26): require_once(‘…’)
#8 {main}\n thrown in …/wp-content/plugins/cookie-notice/includes/frontend.php on line 33, referer: https://…/wp-cron.php?doing_wp_cron=1674169925.9840281009674072265625
It seems that version 2.4.5 is making use of function wp_is_json_request() which version 2.4.4 didn’t:
$ find cookie-notice.2.4.4/ -type f -exec grep wp_is_json_request {} /dev/null \;
$ find cookie-notice.2.4.5/ -type f -exec grep wp_is_json_request {} /dev/null \;
cookie-notice.2.4.5/includes/frontend.php: return isset( $_GET[‘cn_preview_mode’] ) || is_preview() || is_customize_preview() || defined( ‘IFRAME_REQUEST’ ) || wp_is_json_request() || apply_filters( ‘cn_is_preview_mode’, false );
From looking at the reference page of function wp_is_json_request() at https://developer.wordpress.org/reference/functions/wp_is_json_request/it seems that this function was introduced in version 5.0.0 of wordpress while I’m running version 4.8.21.
Going back to plugin version 2.4.4 resolved the issue, so it seems that version 2.4.5 might not be compatible with wordpress version 4.x any more.
It appears that the issue has been fixed in version 2.4.7 of cookie-notice:
$ find cookie-notice.2.4.7/ -type f -exec grep wp_is_json_request {} /dev/null \;
cookie-notice.2.4.7/includes/frontend.php: return isset( $_GET[‘cn_preview_mode’] ) || is_preview() || is_customize_preview() || defined( ‘IFRAME_REQUEST’ ) || ( function_exists( ‘wp_is_json_request’ ) && wp_is_json_request() ) || apply_filters( ‘cn_is_preview_mode’, false );
I’ve installed version 2.4.7 on my wordpress server (version 4.8.21) and the issue is not seen anymore.
Thanks a lot for providing the fix.
Stephan