Updating references of ‘register_field_group’ with ‘acf_add_local_field_group’ in my template solved problem on my end.
Is it okay that I did that?
Note: I’m still running ACF PRO 5.7.10 due to a cron export conflict with WP All Export. I’m not sure if the two issues are related. Although I do use ACF in that export.
Hi everyone, I noticed the same issue with templates where I had used old exported PHP with references to ‘register_field_group’ vs the current method of ‘acf_add_local_field_group’
Updating those references seemed to resolve the problem for me.
I noticed that php referencing ‘register_field_group’ instead of ‘acf_add_local_field_group’ fixed the problem on my end.
I had exported some PHP to my Parent Theme in 2014 or 2015 and it was broken at this release. swapping out those bits seems to have worked on my website.
Thanks Harrison!
I can confirm I’m getting the same message.
Hi agagnon,
This worked for me too.
Thanks,
joe
I solved the problem by creating a php counter http://stackoverflow.com/questions/11869142/how-can-i-make-a-php-counter
column-block-# where # is 1, 2, 3, 4 etc. until the repeat ends. see code below.
// check if the nested repeater field has rows of data
if( have_rows('column_repeater') ):
echo '<ul class="small-block-grid-' . $number_columns . '">';
// loop through the rows of data
while ( have_rows('column_repeater') ) : the_row();
if (empty($counter)){
$counter = 'column-block-' . 1;
}else{
$counter++;
}
$content = get_sub_field ('column_content');
echo '<li><div class="' . $counter . '">' . $content . '</div></li>';
endwhile;
echo '</ul>';
endif;
Thanks Legin76, I’m updating now 🙂
I downgraded from ACF Pro 5.1.1 to 5.1.
Downgrading fixed the problem. I’ll wait until the next version to upgrade 🙁
Hi clburch,
I updated to 5.1.1 this morning and didn’t consider that could be the issue. the blog states a fix to the repeater field.
http://www.advancedcustomfields.com/blog/acf-pro-v5-1-1-update/
“Field group: Fixed bug where sub fields were deleted when moving a repeater field to another group”
Perhaps that same fix is causing deleted fields to display null content. I poked around to create variables
$title = get_sub_field('accordion_title' ); // get the title
$content = get_sub_field('accordion_content'); // get the content
That results in a 0 instead of empty space. Different error same problem the variable is empty.
Solved.
I just needed to officially activate the plugin with my ACF License number.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.