Jump to content

Duplicate module detection doesn't always trigger


gornycreative
 Share

Recommended Posts

For some reason on a new site on 3.0.208 a duplicate module is not being detected. I have the standard release and a multisite modified version.

On my established sites I am able to choose between the two module base directories but on a new installation with 208 and the same module folder it only detect the first module of the pair and will not install it because of a class name conflict.

I've tried clearing cache, setting the appropriate cache disabling rule on cloudflare, deleted compiled files and tried removing one version, installing the remaining version and then adding it back it. The duplicate module is not seen.

This is for two module codebases that define the same class and exist in two different folders in the /site/modules/ directory.

Sites upgraded to 208 don't seem to have the issue. I can install and configure the module on upgraded sites and select the version on the configuration page.

  • Like 1
Link to comment
Share on other sites

Looking at the modules install() code it doesn't actually do a duplicate check when a module is first installed - at least I couldn't find any calls to methods that suggested it.

Once a module config is in the db table the flags flip and duplicate data entries appear in the JSON payload when the modules cache is refreshed, but there doesn't seem to be any reference to that information under other circumstances - so until one version is installed and the config is saved in the db, PW doesn't recognize duplicates exist in the filesystem.

Not a high priority item, but I'll make an issue for it on github. Could save some headaches down the line.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...