[wp-trac] [WordPress Trac] #15191: Avoiding plugin install problems with zip install
WordPress Trac
wp-trac at lists.automattic.com
Fri Oct 22 07:04:12 UTC 2010
#15191: Avoiding plugin install problems with zip install
-----------------------------+----------------------------------------------
Reporter: anmari | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 3.0.1
Severity: normal | Keywords: zip install, upgrade, invalid plugin header
-----------------------------+----------------------------------------------
A number of problems can be experienced with installing via a zip file.
Since it is usually lesser skilled people who use the zip installer,
arguably this should be a 'cleverer' process.
1) If the developer is used to ftp, they will probably zip a plugin at the
higher folder level. This is convenient for unzip and ftping up, but not
for zip installing. The unzip cannot deal with this, it wants the zip
file not to have a top level folder structure. It says "installed" but
then one gets invalid header message. The error message is misleading as
it is more than there is a intervening folder there instead of an invalid
header.
2) If the developer names the zip file with a version number (which is
arguably a good practice) Say pluginname.1.1.zip, the zip installer will
create that exact folder - causing a duplicate plugin problem if an
upgrade was intended. The ftper will avoid this because if they unzip
locally and then ftp, the folder name will be correct.
3) Once problems like this have been experienced, then one seems to get an
invalid header message on plugin activation, even though the plugin is now
in the right folder structure. Possibly wordpress has saved the state
somehow? However it seems that one can ignore this and reverse back to
the plugins list and either the plugin has activated anyway, or one can
then activate from the inactive list. It does not happen cleanly though.
I've had a bit of a look and it seems that it is code in class-wp-
upgrader.php that needs changing. Somewhere between unpack_package and
install_package - probably the working_dir needs to be fixed
Line 192 of wp-admin\includes\class-wp-upgrader.php says:
//Locate which directory to copy to the new folder, This is based on the
actual folder holding the files.
Sooo if one "fixed" the working_dir (stripped the version numbers off and
dealt with the 'inside a folder' situation) then, perhaps the rest would
follow naturally?
My quick notes with some links (to see the wide-spreadness (is that real
word) of people experiencing problems. http://webdesign.anmari.com/2312
/activation-error-plugin-does-not-have-valid-header-still-activates/
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15191>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list