[wp-trac] [WordPress Trac] #14999: Reject invalid theme.zip uploads

WordPress Trac wp-trac at lists.automattic.com
Fri Oct 7 12:42:19 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:  has-patch needs-testing  |
-------------------------------------+-----------------------

Comment (by dd32):

 > I vote for a more user-targeted message also.

 You're both right.. A more descriptive error ''is'' needed for users, but
 I'm not sure a developer-specific error of "Hey, You're missing the
 style.css in the only folder in the archive" is going to be best for end
 users? Developer directions should be left for a more detailed Codex
 article instead (which admittedly, I'm not aware of one existing) - but
 some attempts at filling both uses are below:

  * The uploaded archive was not in an expected format, for more
 information on the expected formats of !WordPress [Theme|Plugin] archives
 please see the `<a>Some-decent-title</a>` codex article.
  * !WordPress couldn't detect a valid [Theme|Plugin] in the uploaded
 archive, for more information see ...

 After writing those, and there actually being less cases to reject items
 based on, a more specific developer-aimed message could be along the lines
 of these adapted from SergeyBiryukov's patch could be used:
  * !WordPress couldn't detect a valid Theme in the uploaded archive:
 Multiple Directories were detected, for more information on the expected
 format of !WordPress [Plugin|Theme] install archives see the blahblah
 codex article.
  * !WordPress couldn't detect a valid Theme in the uploaded archive: a
 valid style.css file could not be located, for more information on the
 expected format of !WordPress [Plugin|Theme] install archives see the
 blahblah codex article.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14999#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list