Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Crash on Auto Align Table #34

Closed
dpmeltz opened this issue Oct 14, 2021 · 8 comments
Closed

Crash on Auto Align Table #34

dpmeltz opened this issue Oct 14, 2021 · 8 comments

Comments

@dpmeltz
Copy link

dpmeltz commented Oct 14, 2021

I'm getting a crash related to Auto Align Table on v 0.3.1 (Obisidian 0.12.18 w/installer 0.12.4 on Windows)
Thought maybe Advanced Tables was conflicting, but I turned that off and still saw the error.

Error is: "Uncaught TypeError: Cannot read property '0' of undefined"

Here's what my file looks like:

---
fileClass: Task
name: Send training invites
status: Doing ▶
started: 2021-10-13
---

people:: [[PERSON NAME]]
related:: [[PROJECT NAME]]

# Send training invites
## Ideas:
| Week | Topic                                       | Americas        | Asia                 |
| ---- | ------------------------------------------- | --------------- | -------------------- |
| 1    | Basics for grabbing slides                  | 10/26 9-10am ET | 10/26 10-11am Mumbai |
| 2    | Putting together your DE&I Quarterly report | 11/02 9-10am ET | 11/02 10-11am Mumbai |
| 3    | Exploring Hiring and Turnover storyboards   | 11/10 9-10am ET | 11/11 10-11am Mumbai |
| 4    | Who is spending too much time in grade?     | 11/17 9-10am ET | 11/17 10-11am Mumbai |
| 5    | Build your own storyboard from scratch      | 11/23 9-10am ET | 11/23 10-11am Mumbai |
@nothingislost
Copy link
Owner

Hmm, I can't replicate this so far on MacOS. When does it crash? Right when trying to load the file? Does the file load at all after the crash occurs?

@dpmeltz
Copy link
Author

dpmeltz commented Oct 14, 2021

"Crash" isn't the right word. If I have the file open, when I turn on Auto Align, the editor view goes blank - preview still shows my full file. If at that point I reload, on open it errors and does not open the file.

Here's the error I get:

Uncaught TypeError: Cannot read property '0' of undefined
    at TableAlign._procLine (eval at <anonymous> (app.js:1), <anonymous>:4321:66)
    at signal (codemirror.js:568)
    at buildLineContent (codemirror.js:1785)
    at getLineContent (codemirror.js:2146)
    at buildLineElement (codemirror.js:2228)
    at patchDisplay (codemirror.js:4237)
    at updateDisplayIfNeeded (codemirror.js:4144)
    at endOperation_W1 (codemirror.js:3853)
    at endOperations (codemirror.js:3830)
    at codemirror.js:3819

Anything else I could do to help? It's not a devastating loss, just trying to be helpful when I saw an error pop up! Such a good plugin

@nothingislost
Copy link
Owner

nothingislost commented Oct 14, 2021

Interesting, I can't replicate it on Windows either. Could you let me know which options you have turned on within the CM Options plugin? The stack trace helps and I can try and provide a blind fix but it would help considerably if I was able to replicate the issue first.

Also, maybe try the same file in a brand new vault with just the CodeMirror Options plugin enabled?

@dpmeltz
Copy link
Author

dpmeltz commented Oct 14, 2021 via email

@nothingislost
Copy link
Owner

Can you try turning on OpenMD Mode? I need to document and/or fix this but I don't believe auto align will work without OpenMD. If that doesn't help either, try replacing main.js in the plugin directory with this patched file:
main.js.zip
You'll need to extract it since I can't attach raw js files.

@dpmeltz
Copy link
Author

dpmeltz commented Oct 14, 2021 via email

@nothingislost
Copy link
Owner

Ok cool, thanks for the update. I'll update the documentation to make the dependency more explicit. Thanks for testing.

@nothingislost
Copy link
Owner

Fixed in 0.4.2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants