media-ui icon indicating copy to clipboard operation
media-ui copied to clipboard

BUG: Moved asset only appears in target collection after reload

Open lorenzulrich opened this issue 2 years ago • 4 comments

Description

If an asset is "moved" from one collection to another, it is not visible in the target collection without a reload of the module.

Steps to Reproduce

  1. Create at least two collections A (first level) and B (second level).
  2. Upload file to collection B.
  3. Click file in collection B and select collection A as "Collection".

Expected behavior

  • The file disappears from the view as I moved it to collection A.
  • When I open Collection A, I see the file.

Actual behavior

  • ✔️ The file disappears from the view as I moved it to collection A.
  • 🐛 When I open Collection A, I don't see the file. As soon as I refresh the page, it shows up.

This only happens when moving a file up in the hierarchy, in my case from collection B to A. Moving from A to B works flawlessly.

Affected Versions

Neos: 8.3 UI: 8.3.4 Media Module: 0.13

lorenzulrich avatar Oct 12 '23 07:10 lorenzulrich

It also seems that the state of the footer is not properly updated. It still shows "1 assets" and the pagination:

image

lorenzulrich avatar Oct 12 '23 07:10 lorenzulrich

In theory I have all necessary cache flushes in place. It might be the assets list of the parent is still cached and I need to flush it separately. Will need further investigation.

Sebobo avatar Oct 13 '23 07:10 Sebobo

This bug is really a bit annoying as it doesn't happen every time. Some timing issue when the various instances and caches are being updated.

Sebobo avatar Jul 01 '24 14:07 Sebobo

1.3.0 includes a partial fix. But there are still some cases in which it doesn't reliably work. Like a 50/50% chance when reassigning an asset.

Sebobo avatar Jul 22 '24 07:07 Sebobo