rero / sonar

SONAR - Swiss Open Access Repository
https://www.rero.ch/products/sonar
GNU Affero General Public License v3.0
12 stars 11 forks source link

Link to file is broken when the file name contains special characters #861

Open pronguen opened 2 years ago

pronguen commented 2 years ago

Problem

Editing a document/file can break the link to a file if it contains certain characters.

How to reproduce

Expected behaviour

Even if a file has special characters, editing or reindexing should not break the ability to access this file.

pronguen commented 2 years ago

Discussion during grooming:

jma commented 11 months ago

It seems that has been fixed by other packages. To fix existing:

doc = DocumentRecord.get_record_by_pid('xxx')
doc.sync_files(list(doc.files)[0])
PascalRepond commented 8 months ago

Reopening this issue with a better description of a way to consistently reproduce.