ugent-library / biblio-backoffice

Apache License 2.0
7 stars 0 forks source link

When uploading files, the file does not always appear, or becomes a separate block #859

Closed mietcls closed 1 year ago

mietcls commented 1 year ago

Bug

When uploading files:

Reported a couple of times but nobody has been able to catch a console log.

Steps to reproduce

Hard to reproduce!

Upload files within a publication in the full text & files tab, see what happens: Image

netsensei commented 1 year ago

I could reproduce this for this particular id: 2012599 as well as 989719 and 01GJDXY8HAP0VD8TE1VTV7K8XW

  1. Upload a new PDF to the publication.
  2. Reload the page.
  3. Notice how there's a dangling file at the bottom of the page.

Also, deleting the publication doesn't remove the file from the page. Hitting "delete" again gives me a version conflict. I need to reload the page to see a refreshed list without the offending file.

I'm also able to upload the same file multiple times, which shouldn't be possible.

netsensei commented 1 year ago

Caused by a stray </div> in a template which confused htmx. Also, noticed that deleting a file didn't refresh the list of files: fixed that too.