New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different modules with same file name #11775
Comments
well the idea is the ext devs would create some unique naming. so example dreamvention doing their own paypal extension could do dv_paypal |
Well, that's why I suggested ages ago to have the extension name included in the install.json file, and not rely on the base file name for the extension folder name. |
its not the same thing |
Well, I think that behavior is a problem because it shouldn't happen. Each extension lives in a different namespace and that allows you to have the same file name (even class) even if they are different extensions. I see the problem in the way the extensions are being loaded. Example: in the case of the modules, all the paths of the module controllers are being loaded from the DB but only the file name of the controller is being taken into account to identify the module. As there are 2 extensions that have 2 controllers with the same name there is a conflict because currently there is no way to differentiate which module belongs to each extension and it is also losing one of the advantages of namespaces. Here the solution I propose is that instead of just taking the filename of the controller ( oc_file_module1 and oc_file_module2 are the name or code of each extension. |
@mhcwebdesign does not make a fucking bit of difference, and u sound like a fucking broken clock keep repeating the same mantra. |
i think put a block on extension using the same code |
@danielkerr No need to put any blocks.
You just need to add extension code everywhere before module code. |
maybe setup the installer to remove any other extension witht he same code. |
@danielkerr We are talking not about extension code, but about module codes inside extensions. Extensions codes must be unique. But developers are asking here to allow using same modules names inside extension. Any developer can call their module for example 'blog'. So there will be a conflict if OC have myext.blog and anotherext.blog |
same with the modules inside |
What version of OpenCart are you reporting this for?
Opencart4x
Describe the bug
When two different modules use same file name then there are conflicts like, installing 1st module will also show 2nd module get installed whereas in actual it does not.
Uninstalling any one of two show both modules uninstalled.
To Reproduce
Steps to reproduce the behavior:
Download attached module files and install it on Opencart 4.0.1.1
Expected behavior
Both modules get installed indecently and functional normally.
two_modules_same_file_name.zip
The text was updated successfully, but these errors were encountered: