Home › Forums › ACF PRO › Gallery Field Not Showing Photo Details › Reply To: Gallery Field Not Showing Photo Details
Hey @Elliot Condon! I currently have the same issue in all my environnments. The gallery field is inside a repeater and the ajax response is empty. It looks like the JS field_key attribute is undefined and thus, not sent to the backend.
In pro-input.js I can cleary seen that this.settings.key returns undefined if I use inline js debugging.
var data = acf.prepare_for_ajax({
action : 'acf/fields/gallery/get_attachment',
field_key : this.settings.key,
nonce : acf.get('nonce'),
post_id : acf.get('post_id'),
id : id
});
If I replace with this it works but it’s not a good solution (but maybe it can help you debug a little bit)
var data = acf.prepare_for_ajax({
action : 'acf/fields/gallery/get_attachment',
field_key : acf.get_data(this.$el.parents('tr'), 'key'),
nonce : acf.get('nonce'),
post_id : acf.get('post_id'),
id : id
});
Cheers!
Great plugin by the way!
Update: seems to happen only when I export to code (php) and I delete the group in the UI. It works well when I it stays in the UI.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.