Opened 9 years ago
Closed 9 years ago
#37664 closed defect (bug) (duplicate)
Editing plugin isn't selected in the dropdown menu
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.8 |
Component: | Plugins | Keywords: | has-patch needs-testing |
Focuses: | ui, administration | Cc: |
Description
- Start editing a plugin in plugin editor (Plugins > Editor)
- Choose the plugin from the dropdown menu on the right (i.e. Theme Check)
- Click on any file other than the root plugin file (i.e.
theme-check/readme.txt
) - You will see the dropdown to change back to Akismet (or the first plugin alphabetically)
Note, there's a word saying (inactive)
when you touch other file than the root plugin file. And I've seen the thing happens when the inactive appears.
My guess is that, somehow only the root plugin file is detected active, so any other file of that plugin are considered inactive, so the dropdown can't stay active to the active plugin that is on the editor.
Attachments (3)
Change History (8)
#1
@
9 years ago
- Keywords has-patch needs-testing added
- Milestone changed from Awaiting Review to Future Release
- Version changed from 4.5.3 to 2.8
The "inactive" bit is added if the plugin isn't enabled on your site (this is incorrectly reported when using anything but the primary file for the same reason the drop down is incorrect).
The drop down relies on recognizing the plugin it belongs to, but we don't actually have a fixed query arg to identify the active plugin by (we change these depending on what file is viewed and the order in which you click on them.
We are currently incorrectly overwriting the plugin
query arg with the file
(introduced in r11500)
Attached patch, 37664.2.patch, removes the conditional, and ensures we don't accidentally pass over the remaining $plugin
variable check by at some point (as it's not explicitly declared in the actual file before this point).
It also updates the URLs used throughout the page to include plugin=$plugin
since we no longer override this variable with the current filename at the start of the file.
Will probably need some more testing, but so far not noticed any incorrect behavior.
#2
@
9 years ago
The "inactive" bit is added if the plugin isn't enabled on your site (this is incorrectly reported when using anything but the primary file for the same reason the drop down is incorrect).
I second that. Attached a screenshot that the plugin is active but showing inactive on the top, and the dropdown is not selected.
#3
@
9 years ago
- Keywords close added
- Resolution set to invalid
- Status changed from new to closed
This ticket is a duplicate:
https://core.trac.wordpress.org/ticket/24122
https://core.trac.wordpress.org/ticket/17552
Perhaps you could refresh those tickets by adding your patch there.
Account for
$file
not overriding the plugin anymore when creating URLs in the edit page