Support

Account

Home Forums ACF PRO Gallery Field Not Showing Photo Details

Solving

Gallery Field Not Showing Photo Details

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

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

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

The topic ‘Gallery Field Not Showing Photo Details’ is closed to new replies.