Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zotero: can’t import two items with the same title #11328

Open
1 of 2 tasks
pagiraud opened this issue May 21, 2024 · 4 comments
Open
1 of 2 tasks

Zotero: can’t import two items with the same title #11328

pagiraud opened this issue May 21, 2024 · 4 comments

Comments

@pagiraud
Copy link

Search first

  • I searched and no similar issues were found

What Happened?

Two items in Zotero can have the same title. This is especially the case with introductions of collective books, written by the editor(s) and that are often simply titled “Introduction”. I have a lot of these in my collection. But, in Logseq, once you have a page named @Introduction, all subsequent tries to add a new document with the same title will simply create a new hyperlink to the first @Introduction page.

Reproduce the Bug

  1. Add a new item using /Zotero
  2. Add another item that has the same title (eg. Introduction) using /Zotero
  3. See that the second item was not created despite the success pop-up showing up.

Expected Behavior

A new page, with a different name (eg. Introduction2 or Introduction - Title of the book) is created.

Screenshots

No response

Desktop or Mobile Platform Information

Linux AppImage, v. 0.10.9

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)
@e-zz
Copy link
Contributor

e-zz commented May 21, 2024

Sadly, in logseq, the title of the details page is taken as the identifier for an entry from Zotero. It follows the usual way that the pape title is treated in Logseq: the unique idetifier to the page. So I think that's an expected behavior.
The Zotero integration of Logseq is designed only for simple cases, not suitable even for slightly more complicated needs like yours.

One solution (maybe the only one) is to adjust all the duplicated titles to something different.

PS: The similar problem should also happen to PDFs with the same name. They might just be regarded by Logseq as the same one when you make annotations in them.

@pagiraud
Copy link
Author

pagiraud commented May 23, 2024

Thanks for your answer.

I see three possible solutions:

  1. The title of the details page could be configured in the Zotero preferences page (in Logseq).
  2. It could optionally (check box in preferences page) contain the unique item key. This key can be accessed with the API. So Logseq would create a page with this kind of title : @Routledge handbook of sustainable design {PF9Y9ICU}.
  3. When adding book chapters or journal articles, Logseq could generate a title of the type @chapter title (from book title).

Do you think one of these options could be relevant ?

@e-zz
Copy link
Contributor

e-zz commented May 24, 2024

Thanks for your answer.

I see three possible solutions:

  1. The title of the details page could be configured in the Zotero preferences page (in Logseq).
  2. It could optionally (check box in preferences page) contain the unique item key. This key can be accessed with the API. So Logseq would create a page with this kind of title : @Routledge handbook of sustainable design {PF9Y9ICU}.
  3. When adding book chapters or journal articles, Logseq could generate a title of the type @chapter title (from book title).

Do you think one of these options could be relevant ?

Thanks for the ideas. You're right, having more naming styles could solve the name conflicts.
There hasn't been any functional changes of the Zotero integration for the past two years. However, I happen to be developing a plugin and might add a feature related to template options for details page titles (e-zz/logseq-pdf-extract#12). I will update here once it's finished.

@e-zz
Copy link
Contributor

e-zz commented Jun 2, 2024

Hi, as a potential solution, in my plugin I implemented an experimental feature using Zotero title template in the page title. Check it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants