Support

Account

Home Forums Bug Reports ACF and WPML 'field-functions.php on line 353' error upon saving page

Helping

ACF and WPML 'field-functions.php on line 353' error upon saving page

  • Hi there,

    We are trying to get our ACF-heavy to work with (newly added) WPML.

    • We use Flexible Content ‘Blocks’ for the base of all our content pages (classic editor)
    • Each Block is set as separate Field Group
    • Each Block also has Advanced Settings, this is also a single Field Group loaded in as a Clone
    • One Field Group, a Flexible Content, loads in all of the individual Blocks

    Now when adding WPML to the site, we’re running into issues and errors. We have used the “copy once” translation option for all flexible content, blocks and advanced options.

    The backoffice works, sorta. We can create translations and the content blocks show up, we can clone them from the base language (English) and modify them.

    However, saving the page gives the following errors:

    
    Notice: Undefined index: key in /wp-content/plugins/advanced-custom-fields-pro/includes/acf-field-functions.php on line 353
    
    Notice: Undefined index: key in /wp-content/plugins/advanced-custom-fields-pro/includes/acf-field-functions.php on line 354
    
    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/advanced-custom-fields-pro/includes/acf-field-functions.php:353) in /wp-admin/post.php on line 231
    
    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/advanced-custom-fields-pro/includes/acf-field-functions.php:353) in /wp-includes/pluggable.php on line 1281
    
    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/advanced-custom-fields-pro/includes/acf-field-functions.php:353) in /wp-includes/pluggable.php on line 1284
    1. Creating a new page, not attached to a ‘parent’ language does not give this error.
    2. Pages that have this error (and are attached to a prent language) also do not show the fields content on the front end, but it is loading the correct skeleton template for that block.
    3. Pages that are not attached to another language do show the correct front and back-end.
    4. Attaching or detaching a page as a parent/child language can cause or solve this issue.

    I’ve tested flexible content on a clean staging environment and it seems to work fine. I’ll do some further testing with clone fields to see if I can catch the bug somewhere.

    Perhaps anyone has a known solution?

  • Update: After testing on a staging environment, I noticed that using a Clone field within Flexible Content causes issues. Not the error perse, but it starts incorrectly showing the fields content on the front-end.

    This is of course related to translating with WPML, it works fine without WPML.

    Any workaround for this? Suggestions?

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

You must be logged in to reply to this topic.

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.