-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
TypeError: style.getCiteProc is not a function #12
Comments
Hi @Jutdm, thanks for reporting! To help me track down the issue, could you open the Error Console in Zotero from Tools > Developer > Error Console and then try to save items into Notion again. Could you send me a screenshot of whatever messages you see there? Also, what version of Zotero are you using? |
Hi @Jutdm, sorry for the delay getting back to you. Can you let me know what format you have selected in Zotero's Export settings? (See screenshot below for what I'm referring to.) I believe the error you're running in to is related to the export format. Also, can you let me know what other add-ons you're using (if any)? Thanks! |
Hello @dvanoni, Thank you for your response ! I use a French format, and no other add-on. Here is the name of the format : EDIT : actually, when changing the exporting format to APA, the add-on works. But is there any way I could continue to use my current format ? Thank you, |
@Jutdm thanks for this additional info! It's sounds like we're on the right track. I downloaded the format you're using to try to reproduce the error on my side, but I haven't been able to so far. Would you mind downloading the latest version of the style to see if that helps at all? I wonder if there have been any fixes to it since you previously installed it. It looks like it was last updated in February. To additionally help with debugging, would you mind running a snippet of JavaScript in Zotero and sending me the output? You can open the window from Tools > Developer > Run JavaScript (or the French equivalent 😄). Here's the code I'd like you to run: let format = Zotero.Prefs.get('export.quickCopy.setting');
format = Zotero.QuickCopy.unserializeSetting(format);
Zotero.Styles.get(format.id); It should output something like this: Thanks! |
Thanks @Jutdm! Unfortunately, I'm not seeing anything out of the ordinary in your screenshot. I was curious to see if I'm still digging in to this to see if I can figure out what's causing the issue. I'll keep you posted! P.S. It looks like someone else has reported running in to the same error in the Zotero Forums. |
🤖 this is your friendly neighborhood build bot announcing test build 0.1.2.18 ("fix: Ensure errors are logged regardless of if they have a stack") Install in Zotero by downloading test build 0.1.2.18, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...". |
@Jutdm would you mind doing me a favor and installing the test build posted above? It won't fix the issue, but it should enable some more error logging that will hopefully be visible from Tools > Developer > Error Console. After installing the test build, could you open the Error Console and then try syncing items again to cause the error to occur? Then send me a screenshot of the error? Thank you! |
Ah, I understand what's causing the issue now! Currently, the code assumes that the APA style is available and uses it to generate the name of the Notion page—the I think this issue is related to a couple others. Someone just mentioned in #14 that they'd also like to have the page name in Notion be the full article title, and others folks in #5 would like to use a different citation key as the page name. So, it sounds like the solution is to make this configurable and not assume that a specific style is installed. @Jutdm thank you so much for debugging this with me, and I'm glad you were able to find a workaround! |
Thank you very much for your work, this pluggin is soooo helpful ! |
@swwwwws, just to confirm, do you have the |
@dvanoni thanks for the quick reply. Yes I installed APA style in Zotero. It was installed and to be sure I installed it again with the .csl file, before I posted yesterday. |
@swwwwws, I'm a bit stumped on this one. Would you mind sending me another screenshot of the Error Console? This time, could you open it and click the "Clear" button on the top right before triggering the error. Then once you've encountered the error, scroll to the bottom of the window (if necessary) to ensure you capture as much of the latest message as possible. Thanks! |
@dvanoni This is the whole error log in the two pictures below. I cleared the log beforehand and then immediately triggered the error. |
Thanks for the additional screenshots, @swwwwws. How are you triggering the error? |
I did some digging, but I'm unfamiliar with the specifics of Better BibTeX and Obsidian Zotero Integration. I'd suggest reaching out to the maintainers of those plugins to see if they can dig into this further. I'm not sure if I'm on the right path, but I found a reference to a translator ID in the code of Obsidian Zotero Integration, and the location of that translator in Better BibTeX. You may be able to reference these when reaching out to those maintainers. |
Thank you for your time and effort! I will bring it to the people who maintain it |
@swwwwws I had the same issue and realized I forgot to create a (Sorry if this should be posted somewhere else, I did not see an issue on the Obisidian Zotero integration github about this subject): |
Same as mentioned here by @Jutdm #12 (comment), I downloaded the APA style again and it worked, even if I already had a For me, the issue appeared through Obsidian Zotero Integration plugin. And contrary to what was mentioned here by @dufourc1 #12 (comment) I didn't have to create a citation format in Obsidian Zotero Integration plugin settings, updating apa.csl in Zotero |
Seems to be fixed in the next beta: https://forums.zotero.org/discussion/comment/456092#Comment_456092 |
Thanks for sharing that thread, @nicolnt! I doubt the fix they mention will resolve the issue for Notero because Notero still relies on the APA style specifically, but I'm going to see if I can fix that by using a similar approach with a hard-coded format instead of APA. |
Well, I don't know that I'm going to hear back from the Zotero developers on that thread. (I know they're very busy.) I did some digging, and I think the code to use as a reference lives here. |
I think I may have finally fixed this! 🤞 Version 0.6.2 no longer relies on the APA style being installed, so hopefully that resolves things. |
Hello,
Thanks for this add-on ! I installed i(, but when trying to add a new document, this error message comes in :
"Failed to save item(s) to Notion.
TypeError: style.getCiteProc is not a function"
Do you have an idea of what the problem could be, and how to solve it ?
Thank you !
The text was updated successfully, but these errors were encountered: