[wp-trac] [WordPress Trac] #36462: Updating or publishing a (custom) post that hasn't loaded completely closes comments
WordPress Trac
noreply at wordpress.org
Sun May 22 17:01:34 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: needs-patch | Focuses: administration
-------------------------------+-----------------------------
Comment (by SeBsZ):
First of all, thank you for your reply.
So, what I do when using checkboxes is I always include a hidden field
with a value of 0 or false, I forget which. When a checkbox hasn't been
checked it won't show up in the POST data, but the hidden field with the
same name will.
Then in the backend, only change the comment_status when it is in the POST
data. If it is not in the POST data don't do anything with it, it means
that part hasn't loaded into the UI yet.
I'm not sure why you are suggesting using JS, I don't believe there is a
need for that.
Would you like me to write a patch for this based on this logic? It'll be
my first patch for Wordpress so bear with me.
Thanks again.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36462#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list