Home › Forums › Backend Issues (wp-admin) › Custom fields get emptied when publishing › Reply To: Custom fields get emptied when publishing
I believe this is the same problem as the one I reported in the old support forum.
As i mentioned, when I publish the post
A) update_value() receives the value,
B) data is stored in “prefix”_postmeta table:
select * from dev_postmeta where meta_key = 'dato' ORDER BY meta_id DESC LIMIT 1;
returns the correct value in meta_value (‘dato’ is the field name)
select * from dev_postmeta where meta_key = '_dato' ORDER BY meta_id DESC LIMIT 1;
returns the correct field_”number” in meta_value
C) create_field() creates an empty field on reload after the publish post
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.