[wp-trac] [WordPress Trac] #9266: Filename conflict between media/attachment and Page template names

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 3 11:36:49 GMT 2009


#9266: Filename conflict between media/attachment and Page template names
---------------------------+------------------------------------------------
 Reporter:  martinredfern  |       Owner:                                                              
     Type:  defect (bug)   |      Status:  new                                                         
 Priority:  low            |   Milestone:  Unassigned                                                  
Component:  Upload         |     Version:  2.7.1                                                       
 Severity:  minor          |    Keywords:  attachment upload media Page_template_name filename_conflict
---------------------------+------------------------------------------------
 If an attachment is uploaded with the same name as a Page template, the
 previously-defined link between a Page and the Page template of that name
 is somehow broken.

 The consequence is that the Page is then displayed using the default
 template, as per the template hierarchy, even though the named Page
 template exists and is correctly linked to the Page under 'attributes' in
 the admin panel.

 Obviously this can be avoided by using distinct names for
 uploads/attachments and Page templates, but this seems an unnecessary
 inconvenience to add to the theme system learning curve.

 Moreover, I was unable to find anything on the support forum referring to
 this issue.

 It seems to me that the cause of the problem is something to do with the
 way the database handles attachments, and that it might be possible to
 distinguish between an attachment, which typically has a file extension
 such as .pdf/.jpg/.png/.gif etc and a Page template name, which is very
 unlikely to have such an extension to its name.

 Perhaps not so much a big fix as a low-priority finesse?!

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9266>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list