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

Fatal error with update in edge case #866

Open
wordpressfan opened this issue Mar 22, 2024 · 0 comments
Open

Fatal error with update in edge case #866

wordpressfan opened this issue Mar 22, 2024 · 0 comments

Comments

@wordpressfan
Copy link
Contributor

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

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

Describe the bug

PHP Error During Imagify Plugin Update from version 2.1.3.1 to 2.2.0.1

The user got the following PHP error when tried to update the Imagify plugin through the Smart Plugin Manager. When attempting manual updates, they do not observe the error, and the process completes without any issues. However, it's crucial to note that the error did briefly appear during the SPM update process and was also recorded in the logs. Fortunately, after the update concluded, the site resumed normal operation.

PHP error:
Uncaught Error: Class "Imagify\Stats\OptimizedMediaWithoutWebp" not found in /xx/content/live/xx/wp-content/plugins/imagify/classes/Plugin.php:58 Stack trace: #0 /xx/content/live/xx/wp-content/plugins/imagify/inc/main.php(29): Imagify\Plugin->init() #1 /xx/content/live/xx/wp-includes/class-wp-hook.php(324): imagify_init('') #2 /xx/content/live/xx/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /xx/content/live/xx/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /xx/content/live/xx/wp-settings.php(506): do_action('plugins_loaded') #5 /xx/content/live/xx/wp-config.php(120): require_once('/nas/content/li...') #6 /xx/content/live/xx/wp-load.php(50): require_once('/xx/content/li...') #7 /xx/content/live/xx/wp-admin/admin-ajax.php(22): require_once('/xx/content/li...') #8 {main} thrown on line 58 in file wp-content/plugins/imagify/classes/Plugin.php

After doing some investigation I found:
We refactored this plugin.php file and renamed this class OptimizedMediaWithoutWebp to be OptimizedMediaWithoutNextGen
so what I can think of is there was a background process running inside Imagify in the same time of update so it was a lucky shot and as the customer mentioned, the site was live and wasn't affected with this error.

We created this issue to keep track of update fatal errors and go from here.

To Reproduce
Steps to reproduce the behavior:
We don't have solid steps, this happens randomly.

Expected behavior
No error should happen with update.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Acceptance Criteria (for WP Media team use only)
Clear instructions for developers, to be added before the grooming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant