Support

Account

Home Forums ACF PRO Gallery Field Not Showing Photo Details

Solving

Gallery Field Not Showing Photo Details

    • acktacky

    • September 26, 2014 at 3:43 am

    Hello!

    Love, love, love this plugin! I seem to be having an issue with the new Pro version though. 🙁 I just updated some of our themes to use Pro, and have found that the photo details section doesn’t appear. This isn’t happening locally, but on our development site it is. I’ve tried the basic troubleshooting: deactivating other plugins, checking the console for errors, etc… Nothing seems to fix it. When I view the source of the code, the section is just completely empty–it’s not that fields are hidden by CSS or something.

    Current WordPress version is 4.0, ACF Pro is 5.0.8. Just wondering if there’s anything else I should check, or if anybody else is having the same issue.

    And of course–thank you!

    • Elliot

    • October 1, 2014 at 12:21 pm

    Hi @acktacky

    Thanks for the info. Can you please enable DEBUG MODE in your wp-config.php file and check your console again? It is most likely a PHP error within the AJAX RESPONSE which is preventing the sidebar panel from rendering.

    Cheers
    E

  • 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.

    • Elliot

    • October 8, 2014 at 6:00 pm

    Hi @jonathan

    Thanks for the bug report. Yes, the field_key is not correctly found, and I will have this fixed in the next version, but I can’t find any connection between this and the actual issue.

    Can you also enable DEBUG_MODE and check for any PHP errors in your AJAX response?

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

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.