[wp-trac] [WordPress Trac] #29920: Autosave breaks if post revision fields contains a value that isn't a string
WordPress Trac
noreply at wordpress.org
Fri Oct 10 14:11:34 UTC 2014
#29920: Autosave breaks if post revision fields contains a value that isn't a
string
--------------------------+-----------------------------
Reporter: mattheu | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
This isn't exactly a bug...
Its possible to filter '_wp_post_revision_fields' to add more fields. I am
using this to track revisions for some meta fields.
However the value of this must be an string otherwise you get notices when
trying to create an autosave - as this calls `normalize_whitespace` on an
array.
It would be nice if this didn't completely break things. I've added a
patch that only calls normalize whitespace if both values are strings -
otherwise just do a simple comparison.
If you think i'm doing_it_wrong - feel free to tell me so!
I guess this is related to #20564 and any other meta revision fields.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29920>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list