Home › Forums › Bug Reports › 5.7.6 Upadate caused all fields and data to disappear › Reply To: 5.7.6 Upadate caused all fields and data to disappear
I ran into similar issues when I updated several sites from 4.X to both 5.7.6 and subsequently 5.7.7. I assumed I had found a bug, but after struggling with a fix for longer than I care to admit, I found that the problem was an ACF hook that had been completely removed from a past release.
A few of my themes and plugins registered custom fields programmatically with a call to register_field_group hooked into the acf/register_fields action. Apparently the acf/register_fields action was removed from ACF after 4.X, but I, like many others, was never prompted to update to ACF 5.X until very recently, even though it appears to have been in production for years now.
Looks like others here may be suffering from a different issue, but for anyone whose fields have disappeared from the backend after a recent move from 4.X to 5.X, search your theme or plugin for any functions that hook into the acf/register_fields action. Move those to something like the acf/init action instead.
While my field groups are all pretty simple without any conditional logic or anything, this fix worked for all of my themes and plugins. The same solution might not work for themes or plugins with complex field groups if a lot has changed between 4.X and 5.X.
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!
ACF wouldn’t be so widely used in WordPress if it didn’t have some pretty amazing capabilities. In this article, we look at a few of the features we’ll discuss during “7 things you didn’t know you could do with ACF” at #WPEDecode later this month. https://t.co/5lnsTxp81j pic.twitter.com/Yf0ThPG1QG— Advanced Custom Fields (@wp_acf) March 16, 2023
© 2023 Advanced Custom Fields.