[wp-trac] [WordPress Trac] #12653: Quick edit template dropdown initially blank in Safari

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 26 04:51:21 UTC 2010


#12653: Quick edit template dropdown initially blank in Safari
--------------------------+-------------------------------------------------
 Reporter:  sillybean     |        Owner:        
     Type:  defect (bug)  |       Status:  closed
 Priority:  normal        |    Milestone:  3.0   
Component:  Quick Edit    |      Version:  3.0   
 Severity:  normal        |   Resolution:  fixed 
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by nacin):

  * milestone:  Unassigned => 3.0


Comment:

 Okay, this one was fun to track down.

 _wp_page_template is enforced in wp_insert_post(), but not in the initial
 install. Hence, when trying to Quick Edit the About page (which I'm
 betting you were doing), the JS is dealing with a value of '', when it
 should be 'default' or the name of a page template.

 (Hypothetically, we should make the nonexistence of _wp_page_template be
 the same as 'default', but since we enforce it in wp_insert_post(), then
 it's fine, except when you quick edit the About page prior to saving it.)

 Now to the browser bug. Using jQuery, we don't mess with selected
 attributes, and instead set the value of the select box to whatever the
 _wp_page_template value is. If an option with that value exists, it works
 well. In Webkit however (I got this in Chrome as well), we get a select
 box with no selected option, if the value does not exist. (Such would be
 the case when '' is the page template -- it should be 'default'.)

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


More information about the wp-trac mailing list