acf-form-shortcode icon indicating copy to clipboard operation
acf-form-shortcode copied to clipboard

Uploaded image not visible in backend

Open thomas-expliciet opened this issue 7 years ago • 3 comments

Hi there,

Love this plugin!

After using this plugin for a year now, we recently noticed an issue. Whenever a user fills in a front-end form and uploads an image, the image is saved into the media-library but it's not displaying (empty) in the post itself when opening it in back-end.

I think this might be an issue witch recently was triggered by something because Its been working al te time before. An update to the ACF pro core files maybe?

This is the shortcode I'm using for front-end usage:

[show_acf_form id="form-inschrijving" field_groups="262" post_id="new_post" new_post="post_type|coach,post_status|pending" submit_value="Verzenden" updated_message="Proficiat, je bent aangemeld als coach.
Wij nemen deze aanvraag in behandeling."]

Thanks!

thomas-expliciet avatar Aug 02 '17 11:08 thomas-expliciet

Hi @thomas-expliciet The plugin is really mostly a wrapper for the acf_form function.

But can you try something. Please go into includes/class-acf-form-shortcode.php and uncomment this line: $this->loader->add_filter( 'acf/update_value', $plugin_public, 'acf_kses_post', 10, 1); on row ~170. Then try again!

jonathan-dejong avatar Aug 05 '17 12:08 jonathan-dejong

Hi, there

Thanks for the response! I looked into this file but noticed the line 170 you mention is already uncommented. I tried to put it between comments en then without but there is no difference to be noticed.

thomas-expliciet avatar Aug 07 '17 07:08 thomas-expliciet

Hi,

Hmm okay. That's really the only way this plugins shortcode would've diffed from regular acf_form. Can you try creating the form yourself in your theme with acf_form() and see if the same issue occurs.. Maybe it's a bug in ACF or possibly a conflict with another plugin.

jonathan-dejong avatar Sep 05 '17 15:09 jonathan-dejong