[wp-trac] [WordPress Trac] #36157: Permalink UI shown without typing a title

WordPress Trac noreply at wordpress.org
Fri Aug 5 08:12:55 UTC 2016


#36157: Permalink UI shown without typing a title
--------------------------+-----------------------------------------
 Reporter:  atimmer       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Autosave      |     Version:  2.5
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  javascript, administration
--------------------------+-----------------------------------------
Changes (by tha_sun):

 * focuses:  javascript => javascript, administration


Comment:

 I don't see how changing that condition would fix the root cause, because
 it only checks whether the permalink UI already exists on the page, so as
 to determine when it needs to be generated and initialized (once).

 Instead, the root cause is the server-side function
 {{{get_sample_permalink()}}}, which happens to generate a numeric
 post_name/slug (the post ID) when an empty title is passed to it.

 Therefore, I'd propose to re-categorize this issue into the component
 "Administration" or "Permalinks".

 In addition, there's another bug that causes the permalink UI to still be
 displayed:

 Even though {{{get_sample_permalink()}}} already contains an existing
 early return statement to cancel the operation (in which case no permalink
 UI should be generated), the calling function
 {{{get_sample_permalink_html()}}} does not handle that case yet, so the UI
 still appears (but with a draft preview link).

 Attached patch fixes both issues.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36157#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list