Help!! I have a neat dashboard which I spent a lot of time putting together, and this morning I tried to add global date filters for several of the queries displayed in the dashboard. I finally managed to do that in a new dashboard, I’m happy.
However in the meantime I tried stuff on the initial dashboard, including adding graphs with not properly defined Field filters, and possibly adding filters to my dashboard, linking them to a query, and editing the query afterwards… And it seems that I messed up something, because even when reverting the queries to their initial content (with no filters) the dashboard just wouldn’t load, saying only " Cannot read property ‘Date’ of undefined". ‘Date’ was the name of a field I tried to filter on, so I guess that there is an “orphan” filter on this dashboard which doesn’t refer to any query anymore, or something like that.
Can I edit/debug my dashboard in any way now, without having to recreate it all?
(Apologies if this is already answered somewhere else, I’ll search now, but it’s quite urgent )
Diagnostic info from Metabase’s Admin panel:
“platform”: “Linux x86_64”,
“userAgent”: “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36”,
“vendor”: “Google Inc.”
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
Well, I kind of resolved it my adding back the ‘Date’ variable in the query, and then the dashboard loads again. I am then able to remove the date filter from the dashboard.
However I get the same error if I remove the date variable from the query afterwards So I’m still grateful if someone can help.
Revision History is your friend:
Edit the dashboard, then the button appears. Roll it back as far as needed.
Thanks Andrew! Unfortunately not, When I’m having this issue, there is no interface at all for editing the dashboard - only the blue top bar of Metabase, and below the message “Cannot read property ‘Date’ of undefined”, and that’s it.
Sounds like you’re seeing this issue:
https://github.com/metabase/metabase/issues/9299 - upvote by clicking on the first post
Indeed that’s the same, thanks! I upvoted.
Take a look in the Metabase database - you should be able to find the previous revisions in there. Not something I’ve played with yet, but it’s where the dashboard definitions are stored.
Hmm thanks - do you mean looking directly into
I probably won’t try it out just now (since I worked around my initial issue), but I’ll keep that in mind for the next production-critical issue!
YEs, that’s right. IF you’re still using metabase.db.mv.db then it’s time to switch to postgress or mysql. You’ll avoid the nast corruption that’s coming closer every minute.
Thanks! Can you elaborate on the risk of corruption? In this Metabase instance I’m using and existing SQLite db file so I guess that there is not much to do about it, is there?
If you’re reading the metabase.db.mv.db file, then you’re using the default H2 database. This isn’t meant to be used for deployment, just for testing and development. If this is live with multiple users, you need to migrate.
Just for reference:
If you want to read more reasons on why to migrate away from H2, then search the forum for topics about corrupted H2 databases.
Thank you very much both, I’ll look into this!