[wp-trac] [WordPress Trac] #36760: Intermittent empty returns from get_post_meta function after 4.5 upgrade
WordPress Trac
noreply at wordpress.org
Thu May 5 02:45:10 UTC 2016
#36760: Intermittent empty returns from get_post_meta function after 4.5 upgrade
-------------------------------+-----------------------------
Reporter: amberau | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.5
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
I've seen this reported several times, but the reporters failed to
properly explain the issue and the tickets were closed.
Since the 4.5 upgrade I am seeing intermittent issues in my custom plugin
(which has worked for years and hasn't changed) where the get_post_meta
function is used if the request is made via ajax or by calling a custom
endpoint. Rolling back the 4.5 upgrade has resolved these issues.
The same function called with exactly the same arguments will return the
meta data value one minute and return an empty string the next (with
single on). The data in the database is unchanged. Logging shows the post
id and meta key are the same, only the return value is different. It
always seems to work as part of a regular page request (not ajax, not
custom endpoint).
Sometimes the function works correctly for 24 hours, then fails several
times. I can't identify any pattern but suspect the meta cache / session.
I tried doing a meta cache update for the object before calling
get_post_meta, but the problem still occurred.
In Googling I've found several people reporting issues related to
get_post_meta after the 4.5 update. Please take a look!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36760>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list