Support

Account

Home Forums ACF PRO Updating from 5.4.6 to 5.4.7 breaks Repeater Fields

Solved

Updating from 5.4.6 to 5.4.7 breaks Repeater Fields

  • Hello,

    I encountered an issue today when updating some plugins on one of our clients websites. After updating ACF PRO to 5.4.7 all of the repeater fields broke on the front end. The content still existed on the back end of the page, and there didn’t seem to be any errors there. However, on the front end of the site, all of the ‘get_sub_field’ and ‘the_sub_field’ calls seem to be retuning nothing. The repeater does recoginize the correct amount of rows, but the content wont be there.

    This is affecting ALL the repeater fields on the site. Not just on one specific page.
    Example of one of the affected repeaters:

    <?php $x = 0; while(have_rows('lead_in_images')): the_row();  $leadImage = get_sub_field('image'); ?>
                        <div class="<?php if(!$x){echo 'active';}?>" style="background-image: url('<?php echo $leadImage['url'];?>');"></div>
    <?php $x++; endwhile; ?>

    returns

    <div class="underlay">
                                        <div class="land-s-0" style="background-image: url('');"></div>
                                        <div class="land-s-1 active" style="background-image: url('');"></div>
                                        <div class="land-s-2" style="background-image: url('');"></div>
                                        <div class="land-s-3" style="background-image: url('');"></div>
                                        <div class="land-s-4" style="background-image: url('');"></div>
                                </div>

    Reverting to 5.4.6 fixed the issue.
    Running WP 4.6.1
    WP_DEBUG set to true, throwing no errors.
    Other non repeater fields all work fine.

    I’ve tried deleting all the fields in the “acf_json” folder, resaving the custom fields, resaving the page, and changing out content in the repeater.

    http://castironluxuryliving.com/

    Edit:
    The issue also persists when creating a new page using the one of the same templates.

  • Hi @superpowered

    I’ve just tested my repeater field on my installation and the get_sub_field() function worked as it should. Could you please share the JSON export file of your field group so I can test it out on my installation?

    Could you also debug the field like this:

    echo <pre>;
    var_dump( get_field('lead_in_images') );
    echo </pre>;

    Also, it’s possible that there’s a conflict on your site. Could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Sixteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.

    Thanks 🙂

  • Blah. Found it. Old version of a plugin was loading in it’s own ACF PRO. I’m a doof and never updated the version number, so it looked like it was the same plugin stack.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Updating from 5.4.6 to 5.4.7 breaks Repeater Fields’ is closed to new replies.