I am trying to: Update the Toolset plugin (without having to do it manually). I've previously opened a ticket for this issue, which was resolved with the solution of manually updating the plugin due to the previous one being 'corrupt'. However, this is now three updates in a row which have caused my site to throw a critical error and fall over. In each case I've had to roll the site back and manually update the plugin. As you can imagine, this is getting pretty annoying. The latest error I got is below, although I don't believe it's always this error that I receive.
Link to a page where the issue can be seen: n/a
I expected to see: Plugin updates successfully
Instead, I got:
Error Details
=============
An error of type E_ERROR was caused in line 89 of the file /www/wp-content/plugins/types/vendor/toolset/toolset-common/utility/autoloader.php. Error message: Uncaught InvalidArgumentException: The classmap must be an array. in /www/wp-content/plugins/types/vendor/toolset/toolset-common/utility/autoloader.php:89
Stack trace:
#0 /wordpress/wp-includes/class-wp-hook.php(287): Toolset_Common_Autoloader->register_classmap(false)
#1 /wordpress/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
#2 /wordpress/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#3 /www/wp-content/plugins/types/application/controllers/main.php(200): do_action('toolset_registe...', false)
#4 /www/wp-content/plugins/types/application/controllers/main.php(163): Types_Main->setup_autoloader()
#5 /wordpress/wp-includes/class-wp-hook.php(287): Types_Main->after_setup_theme('')
#6 /wordpress/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#7 /wordpress/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#8 /wordpress/wp-settings.php(527): do_action('after_setup_the...')
#9 /www/wp-config.php(110): require_once('/wordpress/wp-s...')
#10 /wordpress/wp
Sorry about this, you are trying to update from the regular plugin update pages, you are not using some alternative from the command line or similar?
Is it possible to get a copy of your site for testing prior to manually updating?
hidden link
Be sure to exclude your uploads directory to keep the file size down. You can share a link to the backup files on dropbox or similar here, such links will be hidden.
I built a local copy of your website and I was able to perform the update from the Toolset Installer(Plugins->Add New->Commercial(tab)) without issues.
I believe that the errors are caused by the custom installation that you have on your hosting. I believe it is Flywheel, right?
Because I had to do several patches before being able to work on the installation, and because the wp-config.php file does not include all the variables of a default installation. For example:
- I had to comment on line 301 of the wp-settings.php file
- I had to add the $table_prefix variable in wp-config.php
- I deactivated all active plugins.
During the Duplicator building of the copy, I received a notice that the original site has a different wp-content folder location.
I think that we'll also need the help of the hosting provider to narrow this issue down and fix it once and for all. Can you reach to them and ask for assistance?
Yes it is Flywheel. Their support is very good, so I expect they'll be willing to help. How do you want that to happen? Do you want me to try and get a contact email, or do you have some questions you wish me to ask them on your behalf?
To analyze this error, we would normally, try the following steps. And we have skipped some of them on this ticket:
- Activate PHP debugging to check errors during the update. We did not try this on Flywheel. I tried it on my local setup and it reveals errors related to the Flywheel customization. Check my logs here https://pastebin.com/pH0BGPub I fixed the errors by commenting include_once( ABSPATH . "/.fw-config.php" ); in wp-config.php file.
- Check on a minimal setup(Default theme such as 2020, and only Toolset plugins active). This will reveal any compatibility issues that may exist. We did not try this on the Flywheel hosting. I didn't try either locally, because I had troubles building the copy. So, I disabled the active plugin until I was able to login to the admin without errors. Then I used only Toolset plugins.
- Check on a different environment, either locally or online on our platform. This will reveal if the hosting is causing the issue.
- If the issue is still reproducible, we'll dedicate a developer to work on it. As the issue was not reproduced in my local environment, we could assume that the hosting has something triggering this issue.
So, the next step to take, I imagine, is to try a clean installation on the Flywheel hosting, so we can check if the update from the hosting has issues and it has nothing to do with any additional component on the website(theme, plugins, data integrity, etc.). I wonder if you or the Flywheel support can provide us with a clean WordPress installation, preferably with WP<5.6(so we can test also WordPress update), install the previous plugins of Toolset, and perform the update automatically.
If the issue arises, we'll check the Toolset Installer logs, we may need Flywheel help to check debug logs, and server logs. They may also help by checking network logs too.
If the issue is reproducible on a clean install, I guess, that it would be better that we communicate with Flywheel directly. At this point, I'll escalate this ticket to our 2nd Tier so he could decide how to continue.
If the issue is not reproducible on a clean install. I'll assume that your theme or a 3rd party plugin is causing the issue, and I'll suggest checking if this issue appears when:
- Only Toolset plugins are activated. It will tell us if there is an interaction issue with another plugin.
- The theme is set to a WordPress default like Twenty Fourteen. It will tell us if there is an interaction issue with your theme.
If the problem disappears, start activating one at a time to track where the incompatibility is produced.
If that does not help, we'll need Flywheel support assistance. They should check the logs and analyze from their part too.