Home Forums Bug Reports Flexible Content: Unable to add additional layout or field


Flexible Content: Unable to add additional layout or field

  • When trying to add a layout or field to a flexible content area field it deletes the last layout completely. The field group has 4 flexible content fields (all with several row layouts [15 total]). Additionally, when I try to add an additional field I get the following error:

    Notice: Undefined index: type in /wp-content/plugins/acf-flexible-content/flexible-content.php on line 915

    Warning: Cannot modify header information – headers already sent by (output started at /wp-content/plugins/acf-flexible-content/flexible-content.php:915) in /wp-includes/pluggable.php on line 876

  • Hi @jeffreylouden

    Is this specific to only 1 flexible content field?

    If you create a new one from scratch, does it work?

    I wonder if you have this field registered via PHP in your functions.php file. This can cause some major issues when saving

  • It does only happen with this one flexible content field and actually moving everything to functions.php resolved the issue. We needed to move all of our fields to code anyway to version our configuration, but unfortunately this doesn’t really provide any insight into the underlying cause of the issue.

  • Hi @jeffreylouden

    Potentially, the WP site was not able to add any more data to the flexible content field in the database?

    Perhaps this is a character limit issue? Not sure.

    Glad you found a solution though. Would you mind posting the generated code for the field?


  • Pretty devastated. Haven’t worked on my site since last ACF update, whereupon I now find this same problem. The flexible field in question was established ages ago and has worked continually, perfectly, until now. Today, it dropped all but three of its fields. I tried setting up the fields again as per a backup on another computer (not updated to the recent ACF), but the fields refused to save. A lot of archival information has disappeared – this is very grave for me.

    I don’t understand the solution proffered here as to whether the field is registered or not in functions.php. In my case, the ACF flexible field is set up in a custom post type registered in functions.php – is that what you mean??

    This doesn’t explain why it was working before, but not now?

  • Hi @GHES

    I have a feeling these issues all revolve around the server running out of memory during either the load or save of the field.

    Most likely, the flexible content field contains too much data, or the field names are too long for PHP to keep in memory during the page execution.

    Please do check your server logs and maybe look into increasing PHP memory / max vars per page.

    Good luck mate, I’m sure the issue will resolve itself with some simple investigating!


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

The topic ‘Flexible Content: Unable to add additional layout or field’ is closed to new replies.