[wp-trac] [WordPress Trac] #36462: Updating or publishing a (custom) post that hasn't loaded completely closes comments

WordPress Trac noreply at wordpress.org
Thu Aug 18 02:15:31 UTC 2016


#36462: Updating or publishing a (custom) post that hasn't loaded completely closes
comments
-----------------------------------+-----------------------------
 Reporter:  SeBsZ                  |       Owner:
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  Future Release
Component:  Posts, Post Types      |     Version:  4.4.2
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  administration
-----------------------------------+-----------------------------

Comment (by helen):

 Replying to [comment:9 boonebgorges]:

 > It feels sorta like cheating to have more than one input element on a
 page with the same 'name', and then to take advantage of the fact that
 PHP's behavior with respect to POST (ie, an array) will cause the second
 one to overwrite the first. But I can't find anything in the HTML spec
 that suggests that it's invalid markup, and I can't find anything that
 suggests that we shouldn't trust PHP's behavior here.

 I agree that it feels like cheating and a little risky to trust PHP to not
 break this someday, but if inline docs tell us why it's like this for the
 sake of the future and we perhaps add some kind of automated test for it
 (not a blocker if this means wandering into testing frameworks we haven't
 implemented yet and aren't close to adding), it seems okay to me. I am not
 aware of any other place we might do this kind of thing in core - the most
 similar situation I can think of is with post category checkboxes, where
 there's a hidden input with the same name with a value of `0`. However, in
 that instance it uses `[]` in the name since the checkboxes proper should
 send over an array.

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


More information about the wp-trac mailing list