[wp-trac] [WordPress Trac] #48398: WordPress UPLOAD+ACTIVATE fails if more than one plugin in plugin's folder
WordPress Trac
noreply at wordpress.org
Tue Oct 22 15:43:43 UTC 2019
#48398: WordPress UPLOAD+ACTIVATE fails if more than one plugin in plugin's folder
--------------------------+-----------------------------
Reporter: KestutisIT | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 5.2.3
Severity: major | Keywords:
Focuses: |
--------------------------+-----------------------------
So,
As I developed a plugin that support multiple extensions, I have in plugin
folder two files, i.e.
/GreatPlugin/ExtensionA.php (with "Plugin Name: Extension A" in header)
/GreatPlugin/ExtensionB.php (with "Plugin Name: Extension B" in header)
So if I upload plugin manually, I activate the one I want.
But if I upload via "Upload ZIP" and after extraction I see "activate"
button, it somewhy without any clear reason activates the first one.
In the correct scenario, it should:
1. Either show me a list on that POST-UPLOAD-AND-EXTRACT screen which
exact plugin to activate.
2. Or it would have to activate ALL plugins in the plugin folder.
NOTE (if someone has a question why the hell you may ever need to have two
plugin activations in same plugin folder), the answer is:
1. No code duplication (same /<PLUGIN_FOLDER>/Models/,
/<PLUGIN_FOLDER>/Controllers/ and /<PLUGIN_FOLDER>/Views/ content, only
the /UI/ folder content is different per extension).
2. WordPress does allows me to do that - and there is no logical
restriction why it should not allow to do that - as in MVC & Libraries
world the 'extensions' are very common solution to not to have so-called
'dependency hell' - different library version in different plugin folder,
while it is actually same plugin just with different extensions).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48398>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list