GTM4WP 2.1.1 fixes the fatal error some sites got with 2.1.0
GTM4WP 2.1.1 fixes the EasyDigitalDownloadsModule not found fatal error after updating to 2.1.0, and shows how to bring your WordPress site back.
On November 5, some sites stopped with a fatal error after they updated GTM4WP to 2.1.0. This came from a mistake I made while publishing the release, and I am very sorry for the downtime it caused. GTM4WP 2.1.1 is the same code as 2.1.0 in a complete package, and wordpress.org now offers it as a normal update.
The error
An affected site shows this error on every request, so wp-admin does not work either:
Class "GTM4WP\Modules\EasyDigitalDownloads\EasyDigitalDownloadsModule" not found
Sites that received the complete 2.1.0 package are not affected.
What went wrong
My first commit of 2.1.0 to wordpress.org left out the four module folders that are new in 2.1, because the step I used for the 2.0 patch releases carried over changed files only, and those releases added no new files. I corrected it ten minutes later, at 09:12 UTC, and wordpress.org has served the complete package since shortly after that, hours before the update appeared in any dashboard.
The affected sites received the early copy anyway. So far, every host named in the reports is WP Engine or Flywheel, and WP Engine serves plugin updates from its own mirror of wordpress.org by default, so my assumption is that the mirror picked up the package during those few minutes. I have not been able to confirm this. I have asked WP Engine to check, and I will update this post when I hear back.
Every release now has to pass a check that compares the number of files and the content of each file with the release package before it goes to wordpress.org.
What to do
If your site works, update to 2.1.1 as usual. Nothing changes, because it is the same code. Please check that the Plugins screen shows 2.1.1 before you click Update, and if a site on WP Engine still offers 2.1.0, please do not take that update.
If your site shows the error, delete or rename the folder wp-content/plugins/duracelltomi-google-tag-manager over (S)FTP. This stops the error, and your settings stay in the database. Then download the 2.1.1 ZIP from wordpress.org and install it with Plugins, Add New, Upload Plugin. If you renamed the folder, delete the renamed copy afterwards, because activating it by mistake brings the error back.
With WP-CLI, this command replaces the plugin in one step:
wp plugin install https://downloads.wordpress.org/plugin/duracelltomi-google-tag-manager.2.1.1.zip --force --skip-plugins --skip-themes
If you deactivated the plugin to bring the site back, you can take the update from the Plugins screen, or upload the ZIP and select “Replace current with uploaded”. Please do not use the Delete link on the Plugins screen, because that also removes the plugin’s settings, including the container ID.
Thank you to everyone who reported this on the support forum and by email, and to those who confirmed the fix. The GTM4WP 2.1.1 changelog has the entry for this release. If your site is still down after these steps, please post in the support forum on wordpress.org or on GitHub.
