Make WordPress Core

Opened 12 years ago

Closed 9 years ago

#24050 closed defect (bug) (duplicate)

Plugin Editor doesn't show all plugin files, only 64

Reported by: daedalon's profile Daedalon Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Plugins Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

Plugin Editor (plugin-editor.php) does not allow viewing or editing of all the files of larger plugins, such as Events Manager. Under the Plugin Files header there is a list of only 64 files. The plugin has 165 .php files and many more .txt, .js and .css files.

All editable plugin files should be shown in this list.

Attachments (1)

24050.diff (2.4 KB) - added by MikeHansenMe 12 years ago.
first pass

Download all attachments as: .zip

Change History (11)

#1 @MikeHansenMe
12 years ago

  • Cc mdhansen@… added
  • Keywords needs-patch added

After looking at get_plugin_files() it only looks in plugin directory and 1st level sub directory. In events-manager plugin it has more subdirectories such as events-manager/admin/bookings/em-cancelled .

@MikeHansenMe
12 years ago

first pass

#2 @MikeHansenMe
12 years ago

  • Keywords has-patch 2nd-opinion added; needs-patch removed

Patch looks into sub-folders for additional files. As a side affect the list can become very long. It may be a good idea to do something similar to

#templateside ol, #templateside ul {
    height: 400px;
    margin: 0.5em;
    overflow-y: scroll;
    padding: 0;
}

#3 @bpetty
12 years ago

I've wanted to replace this list with a much more usable (while maintaining accessibility) file explorer (and I really mean just a tree control of some kind here - not a full file manager - plugins already handle that) for a long time now. Preferably something that makes use of the folder hierarchy so you wouldn't have to scroll an entire tree.

It would be nice to see what kind of UI others have used for this kind of thing in the past.

#4 @MikeHansenMe
12 years ago

I agree, if every folder had some kind of accordion (or similar) with the subfiles below it the size would be much better. More usable also.

#5 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #6531 and others: #10429, #14175, #17036, #17281, #17333, #19731, #21086.

#6 follow-up: @Daedalon
12 years ago

Thanks for the patch, Mike! Replying more on it in #6531, where it is also posted.

Sergey, are you sure this one is a duplicate of #10429 or #17036? They seem slightly different to me. The rest seem to be actual duplicates (I tried searching for a duplicate before posting, but apparently this particular issue can be titled in many different ways).

I agree with everyone on improving the usability of the list in other ways as well. To that end I reported two tickets alongside this one:

#24049 Make Plugin Editor's file list alphabetical by full path. I'm hoping this would get fixed alongside the current patch as it has a big effect on usability and is hopefully simple to implement.

#24048 Increase the usability of Plugin Editor's files list (separate directories, limit height). This one is mainly about the height issue. I'm suggesting there a similar file explorer UI as Bryan (bpetty) above.

#7 in reply to: ↑ 6 @SergeyBiryukov
12 years ago

Replying to Daedalon:

Sergey, are you sure this one is a duplicate of #10429 or #17036? They seem slightly different to me.

Right, those are just related.

#8 @bobbingwide
10 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

I believe the title of this defect could be better changed to
"get_plugin_files() only processes one subfolder".

I was using this function until I realised that it can't handle nested folders.
e.g.it would only go as far as listing the sub-folder name. e.g. my-plugin/folder1/folder2
None of the files within folder2 would be listed. So my-plugin/folder1/folder2/myphp.php would not be shown.

A number of patches have been supplied for #24050 and #6531.

With regards to these supplied patches, they could be slightly improved.

If there was a parameter allowing the function to list ALL files regardless of folder depth, with the default being false, then I believe these fixes could be safely applied.
They won't fix the plugin and theme editor problems but it would fix my particular problem.

In the mean time, I will have to use a different routine.


#9 @SergeyBiryukov
10 years ago

  • Milestone set to Awaiting Review

#10 @DrewAPicture
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from reopened to closed

This is still a duplicate of #6531. Let's centralize discussion there.

Note: See TracTickets for help on using tickets.