Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imagify incompatibility with WordPress 5.8 Block Widget Editor #571

Closed
4 tasks
piotrbak opened this issue Jun 11, 2021 · 2 comments
Closed
4 tasks

Imagify incompatibility with WordPress 5.8 Block Widget Editor #571

piotrbak opened this issue Jun 11, 2021 · 2 comments
Labels
3rd party compatibility can't reproduce priority: critical 🔥 The plugin or the website are unusable, it affects a significant number of customers severity: major type: bug waiting for feedback
Milestone

Comments

@piotrbak
Copy link

Before submitting an issue please check that you’ve completed the following steps:

  • Made sure you’re on the latest version
  • Used the search feature to ensure that the bug hasn’t been reported before

Describe the bug
We have a fatal error when trying to edit legacy widgets when Imagify and Yoast are enabled.

To Reproduce
Steps to reproduce the behavior:

  1. Make sure you have some widgets assigned to sidebars
  2. Install WordPress 5.8 (https://wordpress.org/plugins/wordpress-beta-tester/)
  3. Install and activate Imagify and Yoast
  4. Visit the widgets section of the WordPress or check the WP Debug log
  5. See error

Expected behavior
No fatal errors

Screenshots
image

Additional context
Full fatal error:

[11-Jun-2021 13:34:14 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function get_current_screen() in /var/www/imagify.rocketlabsqa.ovh/htdocs/wp-content/plugins/imagify/inc/3rd-party/yoast-seo.php:13
Stack trace:
#0 /var/www/imagify.rocketlabsqa.ovh/htdocs/wp-includes/class-wp-hook.php(303): _imagify_dequeue_yoastseo_script('')
#1 /var/www/imagify.rocketlabsqa.ovh/htdocs/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
#2 /var/www/imagify.rocketlabsqa.ovh/htdocs/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#3 /var/www/imagify.rocketlabsqa.ovh/htdocs/wp-includes/script-loader.php(2015): do_action('wp_print_script...')
#4 /var/www/imagify.rocketlabsqa.ovh/htdocs/wp-includes/class-wp-hook.php(303): wp_print_head_scripts('')
#5 /var/www/imagify.rocketlabsqa.ovh/htdocs/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(Array, Array)
#6 /var/www/imagify.rocketlabsqa.ovh/htdocs/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#7 /var/www/imagify.rocketlabsqa.ovh/htdocs/wp-includes/general-template.php(3 in /var/www/imagify.rocketlabsqa.ovh/htdocs/wp-content/plugins/imagify/inc/3rd-party/yoast-seo.php on line 13

I believe that WordPress shouldn't display errors there anyway, so here's the Github issue on Gutenberg repo:
WordPress/gutenberg#32624

Backlog Grooming (for WP Media dev team use only)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort
@piotrbak piotrbak added type: bug severity: major 3rd party compatibility needs: grooming priority: critical 🔥 The plugin or the website are unusable, it affects a significant number of customers labels Jun 11, 2021
@remyperona remyperona added this to the 1.9.15 milestone Jun 11, 2021
@mostafa-hisham
Copy link
Contributor

I followed the steps and the error didn't show or appear in the log file
I think they fixed it in WP core
please check this
WordPress/gutenberg#32624

@iCaspar
Copy link
Contributor

iCaspar commented Jul 12, 2021

Indeed, these are probably related issues. That said, #567 seems to be happening on WP versions prior to 5.8. Adding the guard to check that current_screen() is indeed loaded may still be in order to prevent a fatal error in any case. See #582.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party compatibility can't reproduce priority: critical 🔥 The plugin or the website are unusable, it affects a significant number of customers severity: major type: bug waiting for feedback
Projects
None yet
Development

No branches or pull requests

4 participants