Zar-rok / Zotero-Add-Collection-Tag

Zotero plugin/addon to automatically include the name of the currently selected collection as a tag to a new item.
MIT License
18 stars 2 forks source link

only tagging the attachment #2

Open brownrec opened 11 months ago

brownrec commented 11 months ago

Hi, I've tried the extension and it is only tagging the attachment but not the item itself. How can I fix it?

Zar-rok commented 11 months ago

Hi,

I don't have any problems with the last release of the plugin and Zotero 6.0.30.

Which version of Zotero are you using?

Can you share the link of the resource you try to add to Zotero, so that I can try to replicate your problem?

brownrec commented 11 months ago

Hi Zar, thanks for replying.

I checked the versions, and both are the last releases.

My main purpose in tagging the items with a collection name is to categorise them automatically in the Notion by taking them via the Notero add-on.

I tried many papers, but the tag only applies to the attached pdf, not the item itself. Hence, Notero cannot identify a tag to transfer.

I now tried with this paper: "https://www.tandfonline.com/doi/full/10.1080/09537287.2022.2063198?src=recsys" and does the same.

I use Mac, just to note, if it makes any difference.

Zar-rok commented 11 months ago

I now tried with this paper: "https://www.tandfonline.com/doi/full/10.1080/09537287.2022.2063198?src=recsys" and does the same.

As you can see below, for me, the tag is correctly added to the item:

Item tagged with the library name

As well as the attachment:

Item attachment tagged with the library name

I tried many papers, but the tag only applies to the attached pdf, not the item itself. Hence, Notero cannot identify a tag to transfer.

brownrec commented 11 months ago

I tried with the same file:

I still don't have the tag on the item itself. If it was, it would automatically go to Notion. Screenshot 2023-12-20 at 13 46 30

In the attachment, it is added: Screenshot 2023-12-20 at 13 48 26

Zotero version is 6.0.30

Is the item tag visible on Zotero at least?

What I think, it may clash with other add-ons. I have these: Screenshot 2023-12-20 at 13 45 35

Or I also noticed that I have reached my Zotero File Storage quota. Thought it may impact.

brownrec commented 11 months ago

I tried by disabling other add-ons and it works when the Zotero Tag add-on is disabled :D I was using it adding read and unread tags, but it seems need to disable now :)

Zar-rok commented 11 months ago

I tried by disabling other add-ons and it works when the Zotero Tag add-on is disabled :D I was using it adding read and unread tags, but it seems need to disable now :)

Ok, nice!

Honestly, I've hacked my plugin based on what others peoples are doing. But I don't know how Zotero works exactly.

I guess that since both my plugin and the zotero-tag one are registered to handle item insertion events:

https://github.com/MuiseDestiny/zotero-tag/blob/49f75591e818afac42e8aa3a62ac63485ba4d5de/src/events.js#L13-L16

https://github.com/MuiseDestiny/zotero-tag/blob/49f75591e818afac42e8aa3a62ac63485ba4d5de/src/events.js#L59-L60

The order in which they are loaded may imply that zotero-tag consumes the events first, and Zotero-Add-Collection-Tag receives nothing.

I will try to see if it's the case and if there is a way to have both extension loaded at the same time!

brownrec commented 11 months ago

That may impact, right.

I tried in both orders, and in both Zotero-tag disactivated item tagging in Zotero-Add-Collection-Tag.