Home › Forums › Backend Issues (wp-admin) › Support for "Legacy" Fields › Reply To: Support for "Legacy" Fields
You may be having a problem with the old data not being compatible with the ACF data and you might need to do additional formatting changes.
As an example, ACF stores a date… well that’s a complicated on. The date is actually stored in the database as YYYYMMDD
but expects it to be YYYY-MM-DD
. This change is internal as was needed to correct a problem when the time and date/time fields were added. If the value is stored in the DB in a different format then you’ll also need to change it to this format before returning it.
Relationship fields store a serialzed array of post ID values and the values need to be integers. A post object field might save a single integer of a serialized array of integers.
It should be possible to have the conversion work on the front and back end. On the front to show old values that have not been updated and on the back to populate the new fields with the old values.
One other hurdle that you might have are posts that have been updated having new fields but no values. These fields will no longer have a NULL value but will either an empty string or an empty array, depending on what type of values it stores.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.