wpdreams / ajax-search-pro-development

Issues and dev tracking repository for Ajax Search Pro for WordPress plugin
0 stars 0 forks source link

Error in latest Ajax Search Pro version #176

Open pdruk opened 1 week ago

pdruk commented 1 week ago

I don't know what all this means but Wordpress has emailed me the following:

An error of type E_ERROR was caused in line 23 of the file /home/customer/www/westendtheatre.com/public_html/wp-content/plugins/ajax-search-pro/includes/classes/Hooks/Filters/Asset.php. Error message: Uncaught Error: Class "WPDRMS\ASP\Asset\Manager" not found in /home/customer/www/westendtheatre.com/public_html/wp-content/plugins/ajax-search-pro/includes/classes/Hooks/Filters/Asset.php:23 Stack trace:

0 /home/customer/www/westendtheatre.com/public_html/wp-includes/class-wp-hook.php(322): WPDRMS\ASP\Hooks\Filters\Asset->onPluginFooter()

1 /home/customer/www/westendtheatre.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)

2 /home/customer/www/westendtheatre.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)

3 /home/customer/www/westendtheatre.com/public_html/wp-admin/admin-footer.php(95): do_action('admin_print_foo...')

4 /home/customer/www/westendtheatre.com/public_html/wp-admin/update.php(186): require_once('/home/customer/...')

5 {main}

thrown

ernestmarcinko commented 1 week ago

Hi,

It was probably triggered during the actual update process. I had one similar report to this - and I was able to replicate in about 1 out of 10 tries during update.

To sum it up really quick:

  1. WordPress gets the update package
  2. While this executes a hook is queued from the previous Ajax Search Pro code
  3. WordPress extracts and replaces the plugin with the new one
  4. The plugin update ends successfully
  5. (Context: In the new plugin a source directory was renamed)
  6. After that the hook from point 2. is triggered - but the Class it refers to was not autoloaded, and still the old autoloader with the old directory name is registered
  7. The error is reported because the file is no longer there from the old version
  8. Afterwards the error is gone, as the new hook now refers to the correct file location after the update

Luckily this does not impact the update process, and the issue should not re-appear afterwards, as the hook no longer registers, and the error is triggered long after the plugin update is finished.

If anyone else gets this by any chance, you can safely ignore it. In case it re-appears, please let me know.

pdruk commented 1 week ago

Thank you

ernestmarcinko commented 1 week ago

I will keep this topic open until the next release, just to be sure.

If for some reason the issue re-appears to anybody more than once after update, just let me know.