Support

Account

Home Forums Gutenberg Changes to Gallery image position not saved

Solved

Changes to Gallery image position not saved

  • In ACF Pro 5.8beta3 I have noticed that if an ACF Gutenberg Block contains a Gallery, changes to the image order (via drag and drop) are not saved. After saving a post and refreshing the edit screen, images are always displayed in the order in which they were added to the gallery.

    Is anyone else experiencing the same bug?

  • The fix described in this github issue did the trick:

    https://github.com/elliotcondon/acf/issues/743

    To apply the fix to ACF Pro 5.8beta3, change the following portion of pro/assets/js/acf-pro-input.min.js:

    addSortable:function(t){this.$collection().sortable({items:".acf-gallery-attachment",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,start:function(t,e){e.placeholder.html(e.item.html()),e.placeholder.removeAttr("style")}})

    becomes:

    addSortable:function(a){this.$collection().sortable({items:".acf-gallery-attachment",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,start:function(t,e){e.placeholder.html(e.item.html()),e.placeholder.removeAttr("style")},update:function(t,e){a.$input().trigger("change")}})

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

The topic ‘Changes to Gallery image position not saved’ is closed to new replies.