Support

Account

Home Forums ACF PRO Empty Repeater Entries

Solving

Empty Repeater Entries

  • I’ve noticed a recurring issue when editing an already existing post (made prior to the plugin upgrade).

    If there are repeater custom fields that are left empty/unused they will have an empty entry after saving. If the post is edited a second time, and the repeater entries manually removed, they will stay removed after a second save.

    This started occurring after the ACF update that required the large database update. This does not appear to occur when making a completely new post (a post made after the upgrade). Myself and my users have noticed this in both Gecko and Webkit browsers.

    Just wanted to see if anyone else was experiencing this. Thanks in advance!

  • Hi @matt

    I’m afraid I don’t understand the issue. Could you please share some screenshots, or better a screen recording, of the issue? Also, could you please share the JSON export file of your field group and let me the steps to reproduce the issue?

    Thanks πŸ™‚

  • Here’s a screen recording.

    And, here’s the JSON export for the Primary Options fields, and here’s a JSON export of everything.

    Hope that helps to explain the issue. I’ve seen this occurring across multiple WordPress installs.

    Thanks again for your help!

  • I am having an same issue.

    I added a repeater field with two required sub-fields in it. And the repeater field itself is optional.

    It doesn’t happen all the time, but sometimes when I try to update a post (with empty repeater field), suddenly these required sub-fields appear and the message says it cannot be updated because these two required sub fields are empty. And I have to remove these sub fields manually, then I can update the post.

    And I am 100% sure I have not entered anything previously for the repeater field.

    It’s not just me. Several my co-workers complained it to me.

    Here’s screenshot: http://imgur.com/a/zoOCD
    – “Links” is a repeater field
    – “Link Title” and “Link URL” are requried sub fields of the repeater field.

  • Hi @matt

    I’m not sure why, but it seems the old posts has repeater row that is set to “1” in the database. This tells ACF that the repeater has 1 row and show it on the backend. Could you please confirm this behavior by checking the old and new posts repeater data in the wp_postmeta table?

    If that’s the case, then the only thing you can do is to remove it manually.

    @krutakee

    I believe your issue is because your fields have the Required? option set to “Yes”. To fix it, could you please set it to “No”?

    Thanks πŸ™‚

  • @james

    The old posts repeater data in wp_postmeta all appear to be correctly set at 0 where appropriate. Example post:

    Database Comparison

    But, when editing an old post in the editor the empty repeater entries appear.

    This behavior does not occur when adding or editing a new post (e.g. a post created after the ACF update that required the database upgrade).

  • Just updated a customer site from 4.x.x to 5.x.x and have exactly the same problem. The repeater fields although empty, all have a 0 value on OLDER posts. Also the width setting of the fields does not seem to work.

    This creates a problem on the front end page rendering as they are not treated as empty fields anymore!

    P.S. I tried updating beforehand on a local machine a limited copy of the site using an older version of the PRO plugin(5.4.8) and everything went ok.

  • Hi @matt

    This is sure weird. Could you please open a new ticket and provide temporary admin credentials to your site for further investigation? You can open a new ticket here: https://support.advancedcustomfields.com/new-ticket. Also, please don’t forget to explain the issue again and provide the link to this thread.

    @lefteris

    Could you please make sure that you have upgraded the database? If you have a backup before the upgrade, could you please try to upgrade it again using one of the WordPress’ stock themes (like Twenty Sixteen) with only ACF activated? Also, could you please check the database to see if there’s something wrong with it?

    Thanks πŸ™‚

  • Hi,

    I confirm that I have updated the database. Unfortunately I cannot do any of the other steps suggested as this is a local news site and cannot go back the db not even for an hour, although we keep daily full backups. Of course using a standard theme is out of question. What I could do is to install an older version Β of the plugin, the one that worked fine on our local machine, but I’m afraid that would mess up further the db.

    Anyway, thanks for your help. Probably we’ll try to find some β€œtricks” to resolve the issues I referred.

  • I am having exactly that same issue. I cannot remove last empty repeater row, it just refuses to save and appears after saving.

  • Hi @lefteris

    Sometimes, a conflict between plugins and themes can cause issues with the upgrade process. You don’t need to do it on your live site. You can try it on your local site to see if the issue was caused by a conflict on your site.

    @maidus

    Have you tried 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.

    Also, could you please share the JSON or XML export file of your field group so I can check your setup?

    Thanks πŸ™‚

  • Sorry, can’t do any testing on a live site. So I can only share json.

  • This reply has been marked as private.
  • Hi @maidus

    It seems there are a lot of field groups in the export file. Could you please let me know which field group and which field that has the issue?

    I’ve also tested the “Avaleht” field group, and couldn’t reproduce the issue.

    Most of the time, issues like this are related to the WordPress installation or the server configuration. The first step we should take to debug this issue is to make sure that there’s no conflict between plugins and theme.

    So, 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.

    If you don’t want to do it on your live site, you can always create a staging/development site and test it there instead. That way the test won’t affect your live site.

    Thanks πŸ™‚

  • This reply has been marked as private.
  • So, after some testing, disabling all other plugins and returning to default WP template It finally did remove that empty line. But, I did have WPML installed before and after disabling it, it did left behind all languages ACF blocks, so I had three repeater blocks. If i did remove empty lines from all three repeaters(EST, RUS, ENG) it did save, but if i removed it from only one language repeater block it did not save and recreated that empty line. So, i think that is related to WPML and ACF compability because default template didn’t have any effect with WPML enabled. I have latest versions from both plugins.

  • Hi @maidus

    I think the issue is some of the repeater entries in the database is set to copy, but the other are not.

    Repeater field has several entries in the database. It looks like this:

    gallery                      2                 // number of rows
    gallery_0_image              6                 // sub field value
    gallery_0_description        "some text"       // sub field value
    gallery_1_image              7                 // sub field value
    gallery_1_description        "some text"       // sub field value

    It’s possible that the first entry (number of rows) is set to copy, so all languages will have the same number of rows. This page should give you more idea about it: https://wpml.org/documentation/plugins-compatibility/translate-sites-built-with-acf/.

    I hope this makes sense πŸ™‚

  • @acf-support Yes! This solved my empty line error.

  • If there are repeater custom fields that are left empty/unused they will have an empty entry after saving. If the post is edited a second time, and the repeater entries manually removed, they will stay removed after a second save.

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

The topic ‘Empty Repeater Entries’ is closed to new replies.