We switched to a manual approval system for registration on this forum, as this makes it easier to keep bots out of the forum. We'll approve everybody who doesn't look like a bot!

Citation Database

Hello,

I've tried to add my zotero library to Zettlr. I followed all the steps written in the documentation. Everything goes well until step 3 : https://docs.zettlr.com/en/academic/citations/

When I write @, the autocomplete feature doesn't appear. If I write the quotation the same way is written in the documentation's example, it doesn't turn into another color. If I try with the citation key as shown in Zotero's information pannel header, nothing happens either. When I open the attachment sidebar, I see the "could not update bibliography".

This is the location and name of my exported betterJSON library.
C:\Users\ximem\Documents\Trabajos\Doctorat\DataBaseBook\BrouillonThese\TheseArtDesignDH.json
This is what I see in the GUI :

My Zettlr directory is "C:\Users\ximem\Documents\Trabajos\Doctorat\DataBaseBook\BrouillonThese"
I'm running the 1.5.0 Zettlr version, on Windows 10 Home.

My zotero version is 5.0.80

Thanks for the help.

Tagged:

Comments

  • The message "Could not update bibliography!" looks as if Zettlr has encountered an error while loading the database. When you start Zettlr, does it give you a notification for an error in the database? It should look exactly like the "You got the newest version of Zettlr"-message that appears everytime you start the app, in the up-right corner! The message should tell you where the engine stumbled.

    If there is no message, it might be in the logs. The logs are located in the data directory C:\Users\<your-user-name>\AppData\Roaming\Zettlr -> "Logs". Look out for everything labeled as an Error or a Warning!

  • I tried again changing the library file :
    1. I opened settings
    2. I changed the location of the JSON file
    3. I got this message : Changes to the library file detected… Reloading.

    1. If i go to log of today I found this
      Changes to the library file detected… Reloading.
    2. I waited for an error message for 5 mins, but nothing happened.
    3. I opened zotero (to check if there's anything appearing) but nothing
    4. I opened the attachment panel : "There are no citations in this document"
    5. I tried typing @B to get the autofill feature and nothing
    6. I opened the attachment panel again, it shows me "Could not update bibliography!"
    7. I opened the log file of today
      [12:34:03] [Error] undefined
      [12:34:03] [Error] Cannot read property 'replace' of undefined
      [12:37:15] [Error] undefined
      [12:37:15] [Error] Cannot read property 'replace' of undefined

    8. I restart Zettlr. No error message about the library, this are the new lines from the log file :
      [12:56:45] [Info] こうんいちわ! Booting Zettlr at Sun Jan 05 2020 12:56:45 GMT+0100 (Central European Standard Time).
      [12:56:45] [Info] Electron reports ready state. Instantiating main process...
      [12:56:45] [Warning] The translation string was malformed: Open Logs!
      [12:56:46] [Error] undefined
      [12:56:46] [Error] Cannot read property 'replace' of undefined
      [12:56:46] [Warning] The translation string was malformed: Open Logs

    Hope this explains something to you so I manage to fix it.

  • The "replace" keyword seems to point to something: On line 259 in the Citeproc-Provider, there are some brackets that are being replaced, with -- apparently -- a malformed citekey. This should not happen, because malformed keys get filtered prior to loading the ID-hints, so something is afoul there. I'll have a look later on!

  • Hi, I have the same issue - I type @a and nothing comes up despite a large number of references. Here is my entire log file:

    [09:25:14] [Info] こうんいちわ! Booting Zettlr at Tue Feb 11 2020 09:25:14 GMT+0800 (Hong Kong Standard Time).
    [09:25:14] [Info] Electron reports ready state. Instantiating main process...
    [09:25:15] [Error] undefined
    [09:25:15] [Error] Cannot read property 'replace' of undefined

    I'm using Zettlr 1.5.0, Zotero 5.0.8.2, Win 10 x64.

  • [09:25:15] [Error] undefined
    [09:25:15] [Error] Cannot read property 'replace' of undefined

    This does not sound great :S

    Erm, would you mind trying the latest 1.6 beta and see if the error still persists? Here: https://github.com/Zettlr/Zettlr/releases

  • Just tried it, got the same result unfortunately. FYI, as mentioned in the other thread, my library has over 10,000 Zotero items.

  • I am running 1.6.0-beta.4 under Win10 and experiencing issues similar to those reported in this thread. I've loaded the citation database and there's no response from @ and when a citation is added its not found among the attachments. The log file shows a similar error.

    [16:06:54] [Error] undefined
    [16:06:54] [Error] Cannot read property 'replace' of undefined
    [16:07:43] [Info] こんにちは! Booting Zettlr at Sun Feb 16 2020 16:07:42 GMT-0700 (Mountain Standard Time).
    [16:07:43] [Info] Electron reports ready state. Instantiating main process...
    [16:07:44] [Error] undefined
    [16:07:44] [Error] Cannot read property 'replace' of undefined
    [16:07:44] [Info] Loaded all roots in 1.334 seconds

    Thank you in advance for looking into this issue.

  • I tried unloading and re-loading the json file. I got no error messages but @ still doesn't bring up any Zotero items.

  • [16:07:44] [Error] Cannot read property 'replace' of undefined

    This error seems curious. Mh, may I ask anyone of you to simply send me your database? This way I can more quickly hack around in the codebase to find the error more quickly! Please feel free to send it to hendrik@zettlr.com, and I'll have a look at it!

  • My library is 8Mb, but I exported about 40 items into a small library and it was able to load in Zettlr, and the @ worked. I don't think I have the time to export different amounts of the library and repeatedly test, but if you want me to test particular characters that you suspect are causing the problem, I'm happy to work on that with you.

  • 8 MB? Oy, that's a lot. It might simply be that parsing the library takes an unusual amount of time (after all it has to be read in, parsed by citeproc, and then loaded into the renderer) ... mh, I think it might work best to have the library at hand, especially as Zettlr does not seem to produce any warnings. From what's written here, it could literally be anything

  • Running Zettlr 1.6.0 (awesome new release, thanks) under Win 10. I went through and cleaned citations in Zotero to eliminate potentially problematic cite keys. Some were a mess. Sub-collections are working fine but still not getting references working properly on entire library. Still getting the following error, and it appears more than a dozen times in the log file.

    [19:54:05] [Error] undefined
    [19:54:05] [Error] Cannot read property 'replace' of undefined

  • Yeah, I didn't manage to have a look at these just now :( 1.6 was pretty hefty already. Sorry!

  • Hi Hendrik, just curious when I should check back for progress on this issue. I understand you're very busy!

  • Yep, yesterday was 9 hours of TableEditor fixing, and yes, I did unfortunately forget to have a look at that issue, but good that you remind me, I'll do it today to have it done!

  • edited March 21

    Hello everyone,
    I have new information on this issue.

    As you can see here, I have many libraries

    I exported the one named MyLibrary, a local one... and surprise ! It works perfectly with zettlr

    a temporary solution:

    So, since that works I tested something... it is not a complete fix but... I am very happy cause it works. These are the steps :
    1. I exported my original group library with the better bibtex option
    2. I imported the json file on zotero (it took several minutes, my library has 417 items. )
    3. I exported the recently imported library with the better bibtex option again
    4. I used the reexported one for zettlr... and bingo !
    It works :smiley:

    So I interpret that this issues has something to do with the group libraries...

  • @hendrik,
    I can share you my group library, if you give me your zotero username :)

  • Hey, @xxXMmm thanks for the offer, BUT I think I just found the correct way of dealing with this!

    The next release will contain rather verbose error reporting, so that long-enduring problems with citekeys will be a thing of the past :)

  • Very glad to hear this! Thanks in advance! This's been nagging me for quite some time.

  • Hi. I was experimenting the problem here mentioned with autocomplete.

    Using Zettlr 1.6.0, Zotero 5.0.81, and Better BibTex for Zotero 5.2.18, I exported my 138 items group into a CSL.json file, then imported it to another group in Zotero, and finally re-exported it in the same format CSL.json, as sugested by xxXMmm. It did work.

    Looking forward for the definitive solution in Zettlr 1.6.1. Thanks in advance, hendrik.

  • P.D. 1. I am using all these under Linux Peppermint Ten.

    P.D. 2. I used Zotero to create a bibliography in APA style from both collections, the one that prevented Zettlr's @-preview (Fail_Better_Bibtex_CLS.json) and the one that played fair with it (Functional_Better_Bibtex_CLS.json), in order to make a text comparisong and find the differences, if any.

    To my surprise, there were seven items that were modified in the process of exporting and re-importing the collenction.

    The seven items that looked like this in the outcome of Fail_Better_Bibtex_CLS.json:

    • Leibniz, G. W. F. von, & Clarke, S. (1980). La polémica Leibniz-Clarke (E. Rada, Trad.). Taurus.
    • Schelling, F. W. J. von. (1999). Filosofia del arte (V. E. López Domínguez, Trad.). Tecnos.
    • Schelling, F. W. J. von. (2001). Ideas for a Philosophy of Nature as Introduction to the Study of This Science, 1797. Cambridge University Press.
    • Schelling, F. W. J. von, & Peterson, K. R. (2004). First Outline of a System of the Philosophy of Nature. State University of New York Press.
    • Schlegel, F. von. (1971). Friedrich Schlegel’s Lucinde and the Fragments. University of Minnesota Press.
    • Schlegel, F. von. (1991). Philosophical Fragments (R. Gasche, Ed.; P. Firchow, Trad.). University of Minnesota Press.
    • Schlegel, F. von. (2005). Conversación sobre la poesía (L. S. Carugati & S. Girón, Trads.). Biblos.

    Look like this in the Functional_Better_Bibtex_CLS.json:

    • Leibniz, G. W. F., & Clarke, S. (1980). La polémica Leibniz-Clarke (E. Rada, Trad.). Taurus.
    • Schelling, F. W. J. (1999). Filosofia del arte (V. E. López Domínguez, Trad.). Tecnos.
    • Schelling, F. W. J. (2001). Ideas for a Philosophy of Nature as Introduction to the Study of This Science, 1797. Cambridge University Press.
    • Schelling, F. W. J., & Peterson, K. R. (2004). First Outline of a System of the Philosophy of Nature. State University of New York Press.
    • Schlegel, F. (1971). Friedrich Schlegel’s Lucinde and the Fragments. University of Minnesota Press.
    • Schlegel, F. (1991). Philosophical Fragments (R. Gasche, Ed.; P. Firchow, Trad.). University of Minnesota Press.
    • Schlegel, F. (2005). Conversación sobre la poesía (L. S. Carugati & S. Girón, Trads.). Biblos.

    The only difference is in the "von" part of the name, that Zotero could not handle at the time of substituting initials for first names at the time of exporting to Better_Bibtex_CLS.json, but did handle properly at the time of re-importing it.

  • edited March 28

    .

  • Hi Hendrik, just curious when I should check back for progress on this issue. I understand you're very busy!

  • Hey,

    I already integrated much more verbose debugging output, I plan to release them in 1.7 together with the new file system.

    However, due to the current problems with Trapmine antivir, I'm currently thinking about simply releasing what has been done so far on the develop branch (including verbose logging) as 1.6.1 to maybe mitigate some of the problems … but I'm still undecided on this. Maybe over Easter, I'll come up with something!

  • Hendrik,

    Thanks for all your efforts on these various fronts. I'm finding it a suitable workaround to just use an interim working collection that only contains items I'm actively citing within the Zettelkasten. When the integration is working, which it does fine with a smaller collection, it works really well.

Sign In or Register to comment.