Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#3507 closed defect (bug) (wontfix)

Plugin Listing Counts Symlinks as another plugin

Reported by: technosailor Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: Cc:


Symlinks are symlinks and shouldn't be counted as an additional file. However, the way the WP code reads at the moment, the only thing that is checked in determining if a plugin should be listed is if it is actually a file (checks true as symlinks point to files) and if it is a directory, looks for the file one directory down.

Proper behavior is to determine if the file is a file and that it is not a symbolic link.

Patch attached for the 2.0 branch. Imagine it should go in 2.1 as well.

drwxr-xr-x   2 theafter theafter  4096 Dec 29 23:44 wp-mobile
lrwxrwxrwx   1 theafter theafter    76 Dec 29 23:44 wp-mobile.plugin.php -> /home/theafter/public_html/wp-content/plugins/wp-mobile/wp-mobile.plugin.php

Attachments (2)

Picture 4.png (25.0 KB) - added by technosailor 11 years ago.
admin-functions.php.diff (392 bytes) - added by technosailor 11 years ago.

Download all attachments as: .zip

Change History (8)

#1 @masquerade
11 years ago

I disagree. I personally use symlinks to keep plugins for multiple installs all updated by simply updating the file that the symlinks point to, and I believe for administrators of many similarly fashioned sites on a single server this should be essential.

-1 for this.

#2 @technosailor
11 years ago

Yeah that's a different argument. Not invalid, but not the point here either. The point is that if you DO have a symlink in the plugins folder to another file/directory in the plugins folder, then the plugins page will report TWO instances of the plugin, instead of one.

I see where this is technically accurate but I think pretty confusing at the same time.

In my case, I need to have plugins in directories because SVN's incapability of supporting svn:external properties on files, and only supporting them on directories. So I've been playing with the idea of moving all files into directories, but this (I think) causes plugins then to become deactivated. (Now I'm not sure on this and need to go check!).

#3 @markjaquith
11 years ago

  • Milestone changed from 2.0.6 to 2.2

Go ahead and continue debating, but this doesn't seem right for 2.0.x consideration, so I'm marking it as 2.2 milestone.

#4 @DD32
11 years ago

Theres no need to Symlink in the file in a subfolder is there? Whats the point of it?
Wordpress loads plugins from subfolders of the wp-content/plugins/ folders regardless, Symlinking to a plugin in those folders dont seems useful; On the other hand, I can see the use of Symlinking to a plugin folder that is common to many blogs.

My vote is to leave as-is.. There doesnt seem to be any issue from what i can see?

#5 @foolswisdom
11 years ago

  • Milestone changed from 2.2 to 2.3

#6 @rob1n
11 years ago

  • Milestone 2.3 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I don't see a point either, and I think symlinks should be treated as proper plugins, also.

Note: See TracTickets for help on using tickets.