Lua-Modules icon indicating copy to clipboard operation
Lua-Modules copied to clipboard

ExternalMediaLinks may be used for multiple use-cases, so uniqueness of URL may be an incorrect assertion

Open x42bn6 opened this issue 6 months ago • 1 comments

In #7135, the URLs were made unique in ExternalMediaLink (requested in #7134) such that if two ExternalMediaLinks had the same URL, it would display an error.

Here, a user wishes to use the same URL for two different ExternalMediaLinks, with different use-cases. The crux of the issue is that the URL points to a magazine, with many different pieces of content, so one uses it to introduce a tournament, and another uses it for an interview. The two ExternalMediaLinks therefore have different titles, different subject(s), and different subject organisation(s). But for any magazine in general, this could hypothetically cover multiple events. Or, really, any piece of media that has multiple "sub-pieces" of content.

The workaround I did was to add a slash to the end of the URL, making it unique, although this obviously depends on the web server re-routing the request correctly. (Other hacks like adding a fake anchor or HTTP GET parameter would work, but look ugly.)

Should this be a valid scenario to consider?

  • The most obvious solution would be to revert #7135, but I don't know whether this adds more value than this edge case.
  • Perhaps a more editor-friendly solution is to add chapter/section/page/etc. parameters, and derive uniqueness using this "compound key" instead.
    • The idea is that the same "sub-piece" of content would have a unique title, author, publisher, date, subject, subject organisation, and event, so having a duplicate of this would be an error.
    • On the other hand, it might be pretty easy to duplicate it anyway, with capitalisation/stylisation differences.

x42bn6 avatar May 12 '26 23:05 x42bn6

Third option: simply add a flag that disables the unique check

mbergen avatar May 25 '26 15:05 mbergen