pantheon-systems / wordpress-composer

WordPress for Pantheon with a composer.json file.
Other
9 stars 14 forks source link

[CMSP-464] v5.9.6 installs both Pantheon mu-plugins #29

Open tedw opened 1 year ago

tedw commented 1 year ago

I was just updating an old site to the latest version of 5.9 and noticed it installed both the older /mu-plugins/pantheon plugin (and pantheon.php file) as well as the newer /mu-plugins/pantheon-mu-plugin plugin. This starts happening in 5.9.6.

Is there any reason why we can’t remove the old plugin? https://github.com/pantheon-systems/wordpress-composer/tree/5.9.7/wp-content/mu-plugins

Currently, I have to manually delete the old plugin or else I get this error:

Fatal error: Cannot redeclare Pantheon_Cache() (previously declared in /code/web/wp-content/mu-plugins/pantheon-mu-plugin/inc/pantheon-page-cache.php:511) in /code/web/wp-content/mu-plugins/pantheon/pantheon-page-cache.php on line 546

Thanks!

tedw commented 1 year ago

In case anyone else runs into this, I was able to fix it by appending the following to/scripts/composer/cleanup-composer:

if [ -d "web/wp-content/mu-plugins/pantheon/" ]; then
  rm -rf web/wp-content/mu-plugins/pantheon
fi

if [ -f "web/wp-content/mu-plugins/pantheon.php" ]; then
  rm web/wp-content/mu-plugins/pantheon.php
fi
pwtyler commented 1 year ago

Thanks for the report— we're tracking this internally as CMSP-464.

chadevans commented 1 year ago

This issue also affects: