dvanoni / notero

A Zotero plugin for syncing items and notes into Notion

Home Page:https://download.notero.vanoni.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collection Field not syncing

Calluna8122 opened this issue · comments

I'm trying to include a field in Notion that shows the Collections an item is in.

I have created a property in Notion titled "Collections".

I tried setting the property as [text] and as [multi-select]. I also tried adding the collections I am syncing as options for the multi-select property.

The property remains blank even though all other information for the Zotero item is syncing.

Hi @Calluna8122, thanks for reaching out.

A multi-select property is the correct type to use. I'm not sure off the top of my head why it's not working. 🤔

Would you mind installing a test build of Notero and sending me a screenshot of the logs following these steps?

  1. Install the test build from here. (You don't need to unzip the file. You can install the zip file directly into Zotero.)
  2. Open the Zotero Error Console from the menu Tools > Developer > Error Console.
  3. Click the "Clear" button at the top of the Error Console.
  4. Go back to the main Zotero window and sync an item to Notion.
  5. Go back to the Error Console and take a screenshot of the logs. We should expect to see something like the image below.

Thanks!

CleanShot 2024-01-11 at 22 13 02@2x

Hi @dvanoni, I had the same issue today and followed your instructions. The 'collections' field was synced using the test build but not the latest build (v0.5.14). Please, find the logs from the error console attached.

Screenshot 2024-02-01 at 13 58 19 Screenshot 2024-02-01 at 13 58 30

Hi @LisaMMilchsack, thanks for sending the logs!

For the item named Lotfollahi et al., 2023, I see that Notero attempted to save a collection option named CompMethods ▸ Perturbation modelling. It looks like the request to Notion succeeded, so I'm not entirely sure why it's not appearing in Notion. I wonder if the Notion API is silently dropping that option for some reason... 🤔 The only thing I can think of is that perhaps there's a limit to how many options Notion allows in a multi-select property.

Would you mind running the following steps to see how many options you currently have for your Collections property?

  1. Open Tools → Developer → Run JavaScript
  2. Paste the below code
    const database_id = Zotero.Prefs.get('extensions.notero.notionDatabaseID', true);
    const database = await Zotero.Notero.getNotionClient().databases.retrieve({ database_id });
    return database.properties.Collections.multi_select.options.length;
  3. Ensure the "Run as async function" option is enabled
  4. Click the "Run" button

This should result in something like the below screenshot. In this example, I have 109 options for my Collections property.

CleanShot 2024-02-01 at 23 10 35@2x

Hi @dvanoni, I'm having a similar issue when none of my Zotero files are syncing to the database now. I've tried uninstalling, disabling, reconfiguring, running error message, and still nothing. My database was syncing for a while and I recently noticed that it wasn't. Any thoughts on how to solve this?
image

Hi @JayCunningham, can you clarify which of the following you're encountering?

  • When syncing an item, the sync fails with an error message.
  • When syncing an item, the sync succeeds but no changes appear in Notion.
  • Items do not automatically sync as expected.
  • Something else?

Hi @JayCunningham, can you clarify which of the following you're encountering?

  • When syncing an item, the sync fails with an error message.
  • The sync in Zotero appears to be successful. Also the small notification for Notero also appears, so I think this is working properly.
  • When syncing an item, the sync succeeds but no changes appear in Notion.
  • Correct, the sync in Zotero appears successful.
  • Items do not automatically sync as expected.
  • The items do no appear in the Notero library at all.
  • Something else?

Thanks for the info, @JayCunningham. I'm a bit stumped if it looks like things are successful within Zotero. 🤔

Just to rule out some strange caching issue in Notion, are you able to open Notion in a private browser window and see if things load any differently there?

Another thing we can do is look at the sync logs using the steps I listed above. If you'd like to give that a try and post a screenshot, please use this more recent test build.

Thanks for the info, @JayCunningham. I'm a bit stumped if it looks like things are successful within Zotero. 🤔

UPDATE: Some of the references from one of my collections just sync'd. Which again is weird because I have multiple collections indicated to sync, and there's definitely more than the 3 that's listed
image
image

Just to rule out some strange caching issue in Notion, are you able to open Notion in a private browser window and see if things load any differently there?
I typically use the desktop app, but the web application still isn't populating differently.
The private browsers didn't make a difference.
Another thing we can do is look at the sync logs using the steps I listed above. If you'd like to give that a try and post a screenshot, please use this more recent test build.

And yes, I did follow those instruction, here is the updated log:
image

I'm not really sure what else to do. It's definitely disappointing because I love this tool.

@JayCunningham, how did you go about syncing those 3 items? Did you click "Sync to Notion" on individual items or on a collection in the left sidebar? Or did they automatically sync as you updated those items?

If you select a collection and click "Sync to Notion", do only some of the items end up showing up in Notion?

Ahh, I see what is happening now! I didn't realize that I needed to 'sync to notion' within the Zotero collective navigation panel.

Now that I am reorganizing and syncing the individual collections, the bibs are now populating. Maybe, this was a silly overlook, but I do think that reinstalling the add-on helped me notice this.

Thanks for your attention and help!

"I'm experiencing an issue with my Notion database where only the 'name' property synchronizes with my Zotero collection, and none of the other properties do. I initially thought it might be because my Zotero is in Spanish and the database template is in English. However, even after changing the 'Authors' property to 'Autor,' it still doesn't work. Any suggestions on how to troubleshoot this issue?"

Hi @Franfranu, I believe Authors should be the correct name for the property. The property names need to match those listed in the Notion Database Properties section of the readme, regardless of the language you use in Zotero (at least until #355 is implemented).

Did you happen to start with one of the example databases linked in the readme? Those databases should be set up to work as is. If you haven't done so, you could try duplicating one of those into your Notion workspace to see if it works.

If that doesn't work, could you follow the below steps to send me some additional info?

  1. From the Zotero menu, open Herramientas > Desarrollador > Run JavaScript (Tools > Developer > Run JavaScript)

  2. In the left side of the Run JavaScript window, paste the following code:

    const notion = Zotero.Notero.getNotionClient();
    const database_id = Zotero.Prefs.get('extensions.notero.notionDatabaseID', true);
    const database = await notion.databases.retrieve({ database_id });
    return database.properties;
  3. Enable the "Run as async function" checkbox

  4. Click the "Run" button at the top left

  5. Copy the result from the right side of the window and paste it here (it should look like the below screenshot)

    CleanShot 2024-03-19 at 23 38 29@2x

Closing this for now. Please feel free to reopen if you're still encountering this issue.