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

[Bug]Refreshing note editor causes Zotero Built-in latex to crash #312

Closed
yiqiaowang-arch opened this issue Jan 5, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@yiqiaowang-arch
Copy link

Describe the bug

In Zotero notes, we can use $ in front and back of Te_ST to create latex block like $Te_ST$.
image

However, After refreshing the note editor, this will change into plain text without any latex rendering.
This happens in various ways.

Bug 1: Latex crash

  • It is possible that after refreshing, $Te_ST$ will turn into TeSTTe_STTeS​T. The $ just disappears.
    image
  • It is also possible that only one $ is replaced, with the other $ unchanged.
    image
  • Sometimes both $ are present, but zotero just failed to render it in latex.
    image

Bug 2: Multiple Enter

  • Also, sometimes more than one Enter is inserted between two lines separated by one single Enter.
    -Before:
    image
    -After:
    image

A more complex formula as an example:

Before:
image
After:
image
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Zotero 6.0.19
  • Better Notes 0.8.8 Build 2023-01-04

Zotero crash report:

[JavaScript Error: "message is undefined" {file: "resource://zotero/note-editor/editor.js" line: 69997}]

[JavaScript Error: "TypeError: node is undefined" {file: "chrome://zotero/content/contextPane.js" line: 315}]
_focus@chrome://zotero/content/contextPane.js:315:1
_togglePane@chrome://zotero/content/contextPane.js:441:7
_toggleNotesButton@chrome://zotero/content/contextPane.js:271:5

[JavaScript Error: "_notesPaneDeck.selectedPanel is undefined" {file: "chrome://zotero/content/contextPane.js" line: 209}]

[JavaScript Error: "_notesPaneDeck.selectedPanel is undefined" {file: "chrome://zotero/content/contextPane.js" line: 209}]

[JavaScript Error: "TypeError: node is undefined" {file: "chrome://zotero/content/contextPane.js" line: 315}]
_focus@chrome://zotero/content/contextPane.js:315:1
_togglePane@chrome://zotero/content/contextPane.js:441:7
_toggleNotesButton@chrome://zotero/content/contextPane.js:271:5

[JavaScript Error: "TypeError: node is undefined" {file: "chrome://zotero/content/contextPane.js" line: 315}]
_focus@chrome://zotero/content/contextPane.js:315:1
_togglePane@chrome://zotero/content/contextPane.js:441:7
_toggleNotesButton@chrome://zotero/content/contextPane.js:271:5

[JavaScript Error: "TypeError: node is undefined" {file: "chrome://zotero/content/contextPane.js" line: 315}]
_focus@chrome://zotero/content/contextPane.js:315:1
_togglePane@chrome://zotero/content/contextPane.js:441:7
_toggleNotesButton@chrome://zotero/content/contextPane.js:271:5

[JavaScript Error: "message is undefined" {file: "resource://zotero/note-editor/editor.js" line: 69997}]

[JavaScript Error: "_notesPaneDeck.selectedPanel is undefined" {file: "chrome://zotero/content/contextPane.js" line: 209}]

[JavaScript Error: "_notesPaneDeck.selectedPanel is undefined" {file: "chrome://zotero/content/contextPane.js" line: 209}]

[JavaScript Error: "_notesPaneDeck.selectedPanel is undefined" {file: "chrome://zotero/content/contextPane.js" line: 209}]

[JavaScript Error: "_notesPaneDeck.selectedPanel is undefined" {file: "chrome://zotero/content/contextPane.js" line: 209}]

version => 6.0.19, platform => Win32, oscpu => Windows NT 10.0; WOW64, locale => zh-CN, appName => Zotero, appVersion => 6.0.19, extensions => Zutilo Zotero 工具箱 (3.10.0, extension), ZotFile (5.1.2, extension), Jasminum (0.2.4, extension), Zotero LibreOffice Integration (6.0.3.SA.6.0.19, extension), Zotero Word for Windows Integration (6.0.2.SA.6.0.19, extension), Zotero Better Notes (0.8.8, extension)

@yiqiaowang-arch yiqiaowang-arch added the bug Something isn't working label Jan 5, 2023
@windingwind
Copy link
Owner

Thanks for the report. The error logs are not produced by this plugin.

This behavior may be related to the recent update, which tries to save note content from the editor before refreshing. I'll dig deeper to see what's happening there.

However, don't rely on the refresh, unless the editor behaves strangely. Zotero saves and updates the note from/to note editors automatically.

@windingwind
Copy link
Owner

removed in the next major version.
Closed for #429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants