huridocs / uwazi

Uwazi is a web-based, open-source solution for building and sharing document collections
http://www.uwazi.io
MIT License
242 stars 80 forks source link

404 Error when deleting an entity #7355

Open salvalacruz opened 4 weeks ago

salvalacruz commented 4 weeks ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Select an entity and click on 'View'.
  2. Click on 'Delete' and confirm.
  3. See error: The entity is still in the card view and the side panel.
  4. See error: if you try to view the deleted entuty, you get a 404 error.

Expected behavior Once an entity is deleted, screen should come back to card view, but the deleted entity must not appear.

Screenshots image image

Device (please select all that apply)

Browser Brave

RafaPolit commented 3 weeks ago

This is more or less expected. Library is loading from Elastic Search, which can take from a second to up to even minutes to reflect these deletions. We cannot be sure when the entity would get deleted from the index and therefore this presents problems.

We could mitigate the problem by "disabling" the card on the library and rendering it gray, almost like a ghost, and prevent interaction with the buttons. But if the user refreshes it could reappear as the entity is still indexed.

We will discuss this on the product call from a tech and UX perspective as to how to communicate this better.