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

TypeError: Cannot read property 'file' of null #101

Closed
cumany opened this issue Feb 11, 2022 · 5 comments
Closed

TypeError: Cannot read property 'file' of null #101

cumany opened this issue Feb 11, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@cumany
Copy link
Contributor

cumany commented Feb 11, 2022

When I open a note as Kanban , this error is reported if I click on the buttons which type is command.
image
image

@NomarCub
Copy link

NomarCub commented Mar 5, 2022

I have the same error message when there's no file opened and I click on a button which is in a document in the sidebar.
I think this is related to #66 and #67.

cumany added a commit to cumany/buttons that referenced this issue Mar 10, 2022
Maybe this is not the best solution, it is clickable when the buttons type is link and command, it works fine
@NomarCub
Copy link

Some commands work now with the latest Obsidian version with active sidebar document support. But for example this open system explorer command button I placed in a sidebar note still doesn't work and leaves errors on console.

plugin:buttons:1421 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id')
    at command (plugin:buttons:1421:45)
    at clickHandler (plugin:buttons:1570:9)

@shabegom shabegom added the bug Something isn't working label Aug 17, 2022
@NomarCub
Copy link

In 0.16.1, with sidebar focus disabled none of my commands work. With sidebar focus enabled most of them do.

@shabegom
Copy link
Owner

shabegom commented Sep 2, 2022

Oh 0.16.1 how will you cause me pain?

@professoroakz
Copy link

I am also getting this error, annoying. Can't seem to make any button work now.

plugin:buttons:1335 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id')
at command (plugin:buttons:1335:45)
at clickHandler (plugin:buttons:1487:9)

shabegom pushed a commit that referenced this issue Jan 31, 2024
Maybe this is not the best solution, it is clickable when the buttons type is link and command, it works fine
@shabegom shabegom closed this as completed Feb 1, 2024
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

4 participants