Current status: Solved. . Done
Gallery: image attributes not updating after change
  • Hi Elliot,

    when using the gallery field, I can add images to it just fine; detail and thumbnail views. When in detail view, clicking on the pencil opens the image edit dialog. Changing e.g. the value of the image title works, the dialog closes and above the changed image there is a message saying something like "success". Unfortunately the changes are not reflected in the detail view. There should be an update on the view, so the changes become visible.
    If I save the post, the view shows the correct data and everything is fine. But the current behaviour is very irritating for the users.
  • After some research I found that there actually is a call for updated data:
    wp-admin/admin-ajax.php?action=acf_get_gallery_list_data&attachment_id=43&_=1353941341992

    For some funny reason, this call doesn't return anything. It simply waits forever for an answer from the server. When I open a separate browser tab and enter the address there, I immediately get an answer with the data expected.

    Any ideas?
  • OK, seems to be an issue with Firefox (version 17.0 on Windows 7). It works like a charm in Internet Explorer... Possibly something with the JS-Framework...
  • Hi @santini,

    That's very odd. Perhaps a conflict with another plugin / theme?

    Let us know if you find the culprit

    Good luck

    Cheers
    Elliot
  • Well, there's no other plugins installed and the theme is the default Wordpress theme without any modifications. But I was able to test it in another installation and with FF 12.0; same issue...
    To me it looks like an incompatibility of the Wordpress' jQuery version and your plugin code. But I don't really have an idea what to do against it...
  • Hi @santini,

    I don't think this is a conflict issue. Instead, I think that ACF is being lazy and not updating the view for the attachment in the detail view.

    I'll look into this

    Cheers
    Elliot
  • OK, I have now verified this. All new install of Wordpress 3.4.2 on Apache 2.2 with MySQL 5.5 (both running as services on Windows 7, no XAMPP) and PHP 5.3.18. Installed ACF and activated the gallery field. Then created a field group with a gallery field in it. Created new post and added an image to it. Switched to detail view.

    When editing the image via the pencil in the upper right corner, everything is saved and a request is sent to the server for fetching the new details of the image (I can see it in Firebug). But this request is waiting literally for hours for the server to respond. This response seems to never be sent.

    When manually calling the URL that is requested (e.g. in a new browser tab), the server answers immediately and the details are displayed.

    Hope that helps in any way.

    Cheers,
    Dominik
  • Hi @santini,

    Thanks for the info. I did some testing and found it was a simple issue caused by the ajax request being called from inside the thickbox. Once the thickbox is closed, the ajax request can't complete as it's caller has vanished!

    I've made some fixes to the js and this will be pushed into the next version

    Cheers
    Elliot
  • Hi Elliot,

    now it works like a charm :)
    Thanks for your support!

    Cheers
    Dominik