• Resolved monagraphic

    (@monagraphic)


    Hello,

    I’m encountering a fatal error when adding an Advanced Link field (ACF Extended) to a page in the WordPress admin.

    Error message:

    Uncaught Error: Cannot access offset of type string on string
    wp-content/plugins/acf-extended/includes/fields/field-advanced-link.php:565

    What I tried:

    • Removed and recreated the field
    • Cleared cache

    Unfortunately, the issue persists.

    Environment:

    • WordPress version : 6.9.4
    • ACF version (PRO) : 6.7.1
    • ACF Extended version : 0.9.2.3
    • PHP version : 8.2

    Additional info:
    The error occurs immediately when accessing the page editor after adding the field.

    I tested the same website on a development environment running PHP 8.4, and the issue persists identically. When I remove the “Advanced Link” fields, the page loads and works normally again.

    Does anyone have an idea of what could be causing this?

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    After checking the source code at the line 565, it looks like the value of your field is malformed. By any chance, are trying to convert an old Field, for example a Text Field, into an Advanced Link?

    The error suggests the post meta saved on your post is a string (a simple text), but Advanced Link requires an array.

    Can you try to temporarily remove the Advanced Link Field from your Field Group, so your page is correctly displayed without any error? Then enable the Developer Mode (see documentation). This will let you see all post meta saved on your page. So you can see what is the post meta saved for the Advanced Link on your page. (For example if your field is called my_link, you’ll see what is the saved post meta).

    If it’s a string, then it means it’s malformed. I would recommend to remove that post meta (you can do it with the Developer Mode directly).

    On my side, I’m adding on my to-do list a check for that specific case when a user try to convert a string post meta into an Advanced Link.

    Please let me know if you find something.

    Thanks!

    Regards.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Any news about this issue? I wasn’t able to reproduce it.

    Thanks!

    Regards.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Just a heads up to let you know the latest ACF Extended 0.9.2.4 version has been released, and it includes a safeguard logic for this issue.

    However, you’re not supposed to have this problem. So I would recommend to double check your setup to make sure you don’t have some custom implementation/code which would produce additional underlying issues.

    Thanks!

    Regards.

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

You must be logged in to reply to this topic.