Secondary URL in Extra field overwrites the main URL field

edited August 14, 2022
I have added a secondary URL as URL: https://www[...] in the Extra field.
I understood from a previous post that this should not overwrite the main URL field:
Existing real fields won't be overwritten by values in Extra.
https://forums.zotero.org/discussion/82055/extra-field-migration-with-multiple-urls

However, when I use the Quick-Copy, I get the secondary URL from Extra inserted in the citation instead of the primary URL.
Is it a bug?

[PS: Side comments:
* I understand that adding secondary URLs in this way is not recommended.
But I find the "Attach Link to URI..." too difficult to use.
* I understand that some of the limitations may be fixed the future, but I just give the context of this specific feedback, to explain why I find that the problem is deeper than each individual limitations listed below
- It is not displayed in the default view (must expand the item in the main library pane)
- I have no way to know that this link exists before expanding the item
- When viewing the PDF file, the only way to see the link is to go back to the item in the library (right click on the tab header -> Show in Library) and then expand the item
- It cannot be copied or edited
- The link in the main library pane when expanding the parent item leaves a lot of empty space in the irrelevant columns
- When I click on the Link child item, the information in the right pane is limited to one line for the URI, and eventually one line for its title, with all the rest being empty space.

I simply want to see the secondary URLs directly from the default library view and on the side of the PDF file view. It would be good for me I think to see them at the bottom of the bottom of the Info pane.
It is probably not good to put this information in the Info pane, which should be reserved for citation purposes. But the Extra field is the best place I could find at the moment.

Some examples of possible use for secondary URLs have been listed in previous discussions, but I would use it for: link to author provided PDF file, link to online supplementary files or webpages, some publications may have multiple official repositories (old publications, PhD thesis, ...), different pages showing the metadata in different languages, link to PDF file + link to the page showing the item's metadata (for example for conferences), ...]
  • edited October 20, 2022
    I just realize that this bug does not happen all the time. I have managed to track down what triggers it.

    I have selected an item with a main URL in the URL field:
    https://gallica.bnf.fr/ark:/12148/bpt6k5831698v/f483.item
    And a secondary URL added in Extra as:
    URL: https://www.academie-sciences.fr/en/Transmettre-les-connaissances/comptes-rendus-de-l-academie-des-sciences-numerisees-sur-le-site-de-la-bibliotheque-nationale-de-france.html
    This item does not have a DOI.

    I have made two duplicates. On one of them, I have removed the pages.
    Then I use the Quick Copy (Ctrl+Shift+C) on the two items, with "American Psychological Association 7th edition". Depending if the item has pages or not, the Quick Copy selects a different URL:
    de Gennes, P.-G. (1984a). Lois d’étalement pour des gouttes microscopiques. Comptes Rendus de l’Académie des Sciences, 298(4), 475–478. https://www.academie-sciences.fr/en/Transmettre-les-connaissances/comptes-rendus-de-l-academie-des-sciences-numerisees-sur-le-site-de-la-bibliotheque-nationale-de-france.html
    de Gennes, P.-G. (1984b). Lois d’étalement pour des gouttes microscopiques. Comptes Rendus de l’Académie des Sciences, 298(4). https://gallica.bnf.fr/ark:/12148/bpt6k5831698v/f483.item

    The bug is not limited to one citation style. For example with IEEE:
    [1] P.-G. de Gennes, ‘Lois d’étalement pour des gouttes microscopiques’, Comptes Rendus de l’Académie des Sciences, vol. 298, no. 4, pp. 475–478, 1984, [Online]. Available: https://www.academie-sciences.fr/en/Transmettre-les-connaissances/comptes-rendus-de-l-academie-des-sciences-numerisees-sur-le-site-de-la-bibliotheque-nationale-de-france.html
    [2] P.-G. de Gennes, ‘Lois d’étalement pour des gouttes microscopiques’, Comptes Rendus de l’Académie des Sciences, vol. 298, no. 4, 1984, [Online]. Available: https://gallica.bnf.fr/ark:/12148/bpt6k5831698v/f483.item

    The options for the Quick Copy are as on this screenshot.
    I have also tested with all plugins disabled.

    Any idea why this is happening?
  • Yes -- Zotero's CSL implementation treats the main URL as non-existent when a page range is present and the "include URL" option in the Cite tab of the preferences is not checked. This (apparently) doesn't affect the post-hoc added URL via Extra. I'd expect that checking "include URL" changes the behavior to always use the main one.

    I don't know if this is a bug -- as you say, you're using this feature off label, which is of course fine, but I don't think anyone is going to chase corner cases related to such usage. (and I don't really see much downsides to the current behavior.)
  • Thank you for the explanations.

    I have added two more test items:
    1) I have removed the Extra in the item with the pages, and in that case it does not show any URL:
    de Gennes, P.-G. (1984). Lois d’étalement pour des gouttes microscopiques. Comptes Rendus de l’Académie des Sciences, 298(4), 475–478.
    2) I have added a DOI with the main URL and Extra URL. In that case the DOI URL shows up:
    de Gennes, P.-G. (1984). Lois d’étalement pour des gouttes microscopiques. Comptes Rendus de l’Académie des Sciences, 298(4), 475–478. https://doi.org/10.1063/1.4918345

    Indeed, checking "include URL" always keeps the main URL or DOI link. So I will be using that option to solve the problem.

    If the expected behaviour is that adding a secondary URL in Extra does not affect any of the Zotero features, this is an example where it does not work.
    The downside is that I will not get the correct URL in some cases, without any real reason or advantage for this behaviour.

    But I understand that this is a tiny corner case that is not relevant for most users. It is good anyway to understand where it comes from and how to avoid it.
    I would probably store the secondary URLs as attached links in most cases (like the link to the preprint of the paper) if they were better displayed with the item.
    It is possible for example in Mendeley to add multiple URLs, so that I can directly see all the links relevant to the item.
  • edited October 20, 2022
    It is possible for example in Mendeley to add multiple URLs, so that I can directly see all the links relevant to the item.
    That's exactly what attached links are for. And in Zotero they can have descriptive names rather than just be URLs. The URL field is for citing.

    You can expand a parent item with a single keystroke, and you can open them by double-clicking or by using the keyboard.
Sign In or Register to comment.