[wp-trac] [WordPress Trac] #14999: Reject invalid theme.zip uploads
WordPress Trac
wp-trac at lists.automattic.com
Thu Oct 20 12:09:29 UTC 2011
#14999: Reject invalid theme.zip uploads
-----------------------------+-----------------------
Reporter: jstrebel | Owner: dd32
Type: enhancement | Status: accepted
Priority: normal | Milestone: 3.3
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: ui-feedback |
-----------------------------+-----------------------
Comment (by chipbennett):
Note: [http://wordpress.org/support/topic/plugintheme-installation-the-
package-is-corrupt-or-not-in-the-correct-format related WPORG Alpha/Beta
support forum topic].
Replying to [comment:19 nacin]:
> The current string in trunk is: "The package is corrupt or not in the
correct format."
>
> Requesting ui-feedback to finalize what we want to say and link to.
You're working from Diff 1, then, right?
The problem is that ''three different types of errors'' are returning this
same string:
{{{
if ( !$dirlist || count($dirlist) > 1 ) { // A proper archive should have
a single directory entry
}}}
...and:
{{{
if ( ! isset($dirlist[ 'style.css' ]) ) // A proper archive should have a
style.css file in the single subdirectory
}}}
So:
1. No root file directory
2. Multiple root file directories
3. No style.css
An error message that encompasses all three:
* '''The package is not in the correct format. Themes are required to
package files within exactly one root folder, and must include a style.css
file.'''
However, I think it would make sense to return ''three different
messages'' for ''three different problems'':
* No root file directory:
'''The package is not in the correct format. Theme is packaged with files
in the root, rather than within a folder.'''
* Multiple root file directories:
'''The package is not in the correct format. Theme is packaged with
multiple root folders.'''
* No style.css
'''The package is not in the correct format. Theme package is missing the
style.css file.'''
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14999#comment:20>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list