mugiwara85/CodeblockCustomizer

p.js:1 TypeError: Cannot read properties of undefined (reading 'dark')

Closed this issue · 6 comments

YukiLx commented

Today I tried updating the plugin to the latest 1.2 version. But after I updated the plugin, I couldn't open some files in the Obsidian Vault.
First of all, I turned on Obsidian's safe mode, closed all plugins, and found that the file could be opened normally, so I thought there should be a problem with a certain plugin.
Then I opened Obsidian's developer mode and found the following content, so the cause of this problem should be the "CodeblockCustomizer" plugin I just updated.
图片

YukiLx commented

At first I thought it was a problem with the new version of the plugin.
When I try to uninstall and reinstall the plugin as described in the ReadMe file, the file not opening problem described above seems to be resolved, but I still see some error messages in developer mode, I am not sure if this will has a problem
图片
图片

Yes, the first errors are caused by the new version of the plugin, that's why reinstalling the plugin or removing the data.json file is necessary (this is one-time only). After you did that, the errors also went away. the error you still see are coming from these plugins (it is written there):

  • customizable-sidebar
  • highlightr-plugin
  • and only one error is coming from my plugin

You have to narrow it down a little, so I can fix it.
When does the error occur? On all notes, or only on specific ones? If only on specific ones, then you'll need to send me such a note, so I can see what causes it. My best guess is however, that there is something causing these errors, since you also get other errors. You could try disabling every plugin you use, then restart Obsidian, and then enabling them one-by-one, and check when the errors start occurring. Or you could create a new vault and only install my plugin to see if the error still persists.

Is the problem solved? Or do you require any help? Please reply, otherwise I will close this issue.

no reply

Sorry for the late reply.
The problem raised by this issue is that the previous markdown note file cannot be opened after updating the 1.2 plugin version. Since I updated the plugin directly from the Obsidian plugin market, I ignored the hints in the github ReadMe.md file. But after I uninstalled and installed the plugin again according to the prompts in the file, the problem that the file could not be opened was solved smoothly, so I did not pay attention to this issue again, sorry for ignoring your enthusiastic help.
Then I took a screenshot showing some errors and warnings output to the console. I tried to install the plugin and open the same file in the sandbox according to your description, and found that there was no similar problem. And then I found out that the warnings displayed in the console were caused by other plugins, such as the settings-search plugin.
I'm still using the plugin normally, thanks for your efforts and contributions. Finally, I would like to raise a little question: During my daily editing and use, I occasionally find that the rendering effect of the title and code block in Obsidian is lost, and only the ordinary txt text content is displayed. I need to close and reopen the note to get back to normal and render correctly.At present, I am not sure what caused the problem. I don’t know whether there is still a conflict between plugins. The next time the problem recurs, I will locate the problem and report to you. Thank you for your hard work on this project

That's great to hear.
If the other problem reappears just let me know. If there is an error in the console, send that to me please. Also please send a picture if the problem reappears, so I can see it as well.