Home › Forums › Feature Requests › Change how the link field is stored in the database › Reply To: Change how the link field is stored in the database
I mention other plugins because it is the commonly accepted way to store arrays in the database.
The tool that I linked to does not ignore serialized date. It extracts the serialized data, makes the string replacement and then correctly serializes and stores the changed data. It may seem like overkill, but it is the only safe way to find an replace strings in serialized data. Doing a simple search and replace will never work.
I use this tool on every site launch, whether I think I need it or not. As I said many plugins use the same method of storing URLs and I never know if I’m using a plugin that does so or not. I have seen a lot of sites crash because of altering serialize data.
To be honest, I’ve never used a link field myself, but other developers I work with have. But I have used other plugins that store absolute URLs to media files and other types of URLs for the site. Other plugins I’ve worked with also store absolute server paths in serialized data in the DB, a stupid practice, but it is done. Not altering these correctly can crash a site. Using the tool is simple a way to make sure data does not disappear.
I’m not the developer, and I can’t say that the solution you propose could not be done. But it would not be backwards compatible. ACF stores several fields as serialized arrays, not just the link field. I doubt that this will change.
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!
© 2022 Advanced Custom Fields.