modxcms / Collections

An Extra for MODX Revolution that provides for Resource Collections managed by CollectionContainer Resources
GNU General Public License v2.0
53 stars 37 forks source link

Collections 4.0.0-alpha : Old class_key CollectionContainer is not changed #336

Closed Jako closed 2 years ago

Jako commented 2 years ago

The old class_key CollectionContainer is not changed from CollectionContainer to Collections\Model\CollectionContainer during installing Collections 4 alpha. Collections 3 was not installed in this installation. Only the database was copied from MODX 2.x to MODX 3.x.

Mark-H commented 2 years ago

Just tried this on a site and it did not seem to run that migration. Had to fix it manually in the database.

I didn't keep installation logs unfortunately, but the first time I tried to install it failed with a fatal error because Collections was still being loaded from the extension_packages, which ran into a require_once call for modprocessor and bombed the upgrade.

After removing collections from the extension_packages, I could complete the installation. I'm guessing though that the resolver didn't run because it only runs on xPDOTransport::ACTION_UPGRADE, while after a failed installation it'll process as a xPDOTransport::ACTION_INSTALL because it doesn't appear as installed yet in the list of packages.

To get Collections to update properly in one go I think two tweaks will be needed:

theboxer commented 2 years ago

ok, another attempt to resolve this in 95e0b20

theboxer commented 2 years ago

OK, so the final fix is in 9728573d1f7718229215e41235388dc4971e20cf