Support

Account

Home Forums Backend Issues (wp-admin) Warning: Illegal string offset 'acf_fc_layout'

Solved

Warning: Illegal string offset 'acf_fc_layout'

  • Plugin Version: 5.3.9.2
    WP Version: 4.5.3

    After creating a custom field, I’m experiencing this error:

    Warning: htmlspecialchars() expects parameter 1 to be string, array given in…wp-includes/formatting.php on line 3303

    The custom field settings:
    Label: Content
    Field type: WYSIWYG Editor
    (other default settings)

    Rule: Page is equal to About Us

    Not sure what is causing the issue.

    To Add:
    When I add content into the custom field in a Page, the content disappears after saving.

  • Have you tried deactivating other plugins? Maybe changing theme?

  • Yes, I have.

    It must be a bug because I went into the Custom Field and deleted the fields. After rebuilding them, the issue went away.

  • When I create a new Page, the error comes back. But if I go back to the first Page that I encountered the issue, the error isn’t there.

    And it gets more interesting:
    More errors:

    Warning: Illegal string offset ‘acf_fc_layout’ …plugins/advanced-custom-fields-pro/pro/fields/flexible-content.php on line 238

  • If it’s a bug, unless you can recreate it and tell me how, it will be hard to fix.

    Other than a bug, could you have accidentally had two fields with the same name in the layout? One of which was an wysiwyg editor and the other anything that returns an array, like a checkbox, multiselect, relationship type fields? This could cause it, especially if the wysywig is before the other field.

  • I’ll take a look to see if there are any repetitions.

  • Posted before I replied.

    The fact that saving the field and the content disappears is a further indication that you have two fields with the same field name. Check all the fields that appear on the “About Us” editor page and make sure they are all unique.

  • Yep, there were repetitious fields.

    Recreated them to be unique and all went well!

    Thank you, Mr. Huebner.

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

The topic ‘Warning: Illegal string offset 'acf_fc_layout'’ is closed to new replies.