Home Forums Bug Reports Bug FILE field and IMAGE field in front-end bug in 5.6.0


Bug FILE field and IMAGE field in front-end bug in 5.6.0

  • Hello,
    I have just updated ACF in 5.6.0 and now field FILE and IMAGE are not working in my front-end forms.
    Files and images are uploaded ine medias but not attached or saved in the field post.
    Any idea ?
    I’ve no error messages in console and no error in WP_DEBUG debug.log

  • I’m experiencing a similar behavior and can confirm this bug was introduced in ACF 5.6.0.

    In my testing, the Front End image field uploads the asset to the Media Library, but the ACF Form shows a validation error, so it’s both misleading and broken.

    On macOS 10.12.x using Chrome 60.x this shows as the following:


    See the attached screenshot for more information.

  • Please submit bug reports by opening a new ticket here

  • I’m seeing this issue as well, the image field in my front end form is broken after upgrading to 5.6.0.

  • it’s done : i opened a ticket support before posting in forum but i m waiting for solution.
    Thank you guys, it’s it’s pretty urgent :o)

  • Elliot’s answer for this problem :
    I’ve just done some testing with the acf_form() function and basic uploader, but cannot replicate any issue with the uploaded image/file.
    The attachment uploaded is correctly connected to the new post created by the acf_form()

    It may be possible that another plugin is causing the conflict.
    If you are able to debug this issue, that would be great.

    Both the image and file fields use the update_value() function found within the file ‘includes/fields/class-acf-field-file.php’ line 347.
    This function is called right before the value (postmeta) is saved into the DB .
    You can see hat on line 374, the function acf_connect_attachment_to_post() is called to connect the attachment with the post.
    – This has not changed from 5.5.14 to 5.6.0, however, you should start here in your debugging to test what is going wrong in this function.

    After desactivating all my plugins the problem is still there.

    For the moment, to work around the problem I added in my
    add_action(‘acf/save_post’, ‘my_acf_save_post’, 20);
    the following actions:
    $my_file_id = $_POST[‘acf’][‘field_57th9069b8012’];
    update_field (‘post_my_file_field’, $my_file_id, $post_id);

    Not a good solution but it works for me ;o)

  • Elliot said :
    re-download the ACF PRO plugin files from your account online.

    It is very possible that a recent patch has fixed this $_POST issue.

    and for me it works.
    Bug is fixed !

  • I can confirm that the newer-but-still-the-same-version-number 5.6.0 solves the image problem. (Honestly, it would be less confusion if bugs where fixed with a new version rather than patched on already released versions.)

  • Agreed, it would be preferably for any patches or bug fixes to follow the Semantic Versioning principle.

    Meaning, once a bug has been fixed or a patch applied, a new version would be released instead of simply updating files and keeping the same version.

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

The topic ‘Bug FILE field and IMAGE field in front-end bug in 5.6.0’ is closed to new replies.