Closed solonmedia closed 1 year ago
@ryancramerdesign this is still an issue. You get an error when you try to install a module with the same class name, as solonmedia described. If you then delete a folder with a duplicate module, you can't uninstall it:
I had to restore the folder with the duplicate module, and then I could uninstall it. After uninstall, I again deleted the folder with the duplicate module (the “original” module is in folder /site/modules/AddLink
and the copy of the module with the same class is in folder /site/modules/AddLink - Kopija
) and attempted to install the module, but I couldn't:
It looks like the modules cache is still referencing the copy of the nonexisting module directory. Modules Refresh fixed it.
@solonmedia @matjazpotocnik Thanks, I've pushed a fix for this.
Thanks Ryan, looks good. @solonmedia, closing.
Short description of the issue
When two modules with the same class name exist in the site/modules/ directory and neither have been installed, a single copy appears in the modules cache, and trying to install it results in an error because of a clash in class names.
Expected behavior
The system should pick the first version it finds and install it. The version selection can be made once the first found copy installs.
Actual behavior
The system appears to try to install both versions, and fails when trying to process the second class definition without writing the module configuration row to the database. As a result, the module cannot be configured and a version cannot be selected.
Steps to reproduce the issue
Setup/Environment
This doesn't happen when creating customized version of wire/modules in site/modules because the core modules being modified likely already are installed.