Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author andersthorborg

    (@andersthorborg)

    Hi there,

    Thanks for posting.

    I can’t currently reproduce your issue. Are you running the latest version of the plugin?

    Also, try updating to ACF 5.1.4 and let me know if you still experience the issue.

    Best,

    Anders

    I’m using ACF 4.4.1 and just installed ACF ICA 1.4.1 and seem to be experiencing this issue as well.

    I have an image field that was originally set up that I have changed to be Image with user-crop. The settings I have for the field are:
    Crop type: Hard crop
    Target size: Page header (my custom image size, set in my functions.php)
    Preview size: Page header
    Force crop: Yes
    Save cropped image in media library: Yes
    Retina: No
    Return value: Image Object

    I add an image and crop it, then save the post and view it on the website, I get a PHP fatal error ( Cannot use string offset as an array…) for the section of the template where the banner is set.

    For the banner, I have:
    $eventimg = get_field(‘event_featured_image’);
    $eventimgsize = ‘page-header’;
    $eventimgthumb = $eventimg[‘sizes’][ $eventimgsize ];

    This worked previously, however now it doesn’t.

    If I add in:
    echo ‘

    ';
    var_dump( $eventimg );
    echo '

    ‘;

    it returns:
    string(4) “2242”

    I’ve tried changing the Return Value to Image URL and Image ID as well, and all three options return the same string(4) “2242” value for the var_dump.

    Any idea what’s going wrong?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Return value always returns ID’ is closed to new replies.