Broken Dashboards!

I have EMONCMS (EMONPI) hosted on a Raspberry Pi with a Western Digital HDD. All was was working well until I added the Graph module from GIT. After installation, I managed to get locked out before I could run Setup | Administration | Update Database, so executed “php emoncmsdbupdate.php” on the command line (file content as follows):

"<?php
// Update Emoncms database
$applychanges = true;
define(‘EMONCMS_EXEC’, 1);
chdir("/var/www/emoncms");
require “process_settings.php”;
require “core.php”;
$mysqli = @new mysqli($server,$username,$password,$database);
require_once “Lib/dbschemasetup.php”;
print json_encode(db_schema_setup($mysqli,load_db_schema(),$applychanges))."\n";"

Needed to clear my browser cache (Chrome) to clear “UNSUPPORTED” flags in the Input list and a lot of things (Inputs, Feeds, Visualizations and Graphs) started working.
However I am left with “Uncaught ReferenceError: _Tr_Vis is not defined” error" when running or attempting to modify dashboards and “Undefined index: content in /var/www/emoncms/Modules/dashboard/Views/dashboard_edit_view.php on line 66” when switching from dashboard design mode to view mode. Line 66 seems to at or around:

<div id="page-container" style="height:<?php echo $dashboard['height']; ?>px; background-color:#<?php echo $dashboard['backgroundcolor']; ?>; position:relative;">
    <div id="page"><?php echo $dashboard['content']; ?></div>
    <canvas id="can" width="940px" height="<?php echo $dashboard['height']; ?>px" style="position:absolute; top:0px; left:0px; margin:0; padding:0;"></canvas>
</div>

When I execute the dashboard editing feature, there are a bunch of missing tools in the toolbox and previously working dashboards have missing feed value widgets.

“cd /var/www/emoncms && git pull” says “Already up-to-date”

I’d be most grateful for some help with this problem, any ideas?

EDIT - formatted code - Paul (moderator)

Is the dashboard module up to date?
cd /var/www/emoncms/Modules/dashboard && git pull

PS - to post code etc, place three back ticks on the line before, and line after the code;

```
code here
```

result;

code here

Paul, thanks for your amazingly swift response!
Updating the dashboard module did the trick. I naively assumed that " cd /var/www/emoncms && git pull" would update everything. Should I be updating all of the other modules as well? Most module folders are timestamped with today’s date but I note that /time is not.

PS thanks for correcting my code - I’ll use the three back ticks next time.

1 Like

If it’s an emonpi, it should be updated via the emonpi update menu link, which will update them all.
If it’s self-build based upon a raspberry pi, then yes. Some of the recent changes to the modules require them to be brought up to date, so that they can work together.

Hmmm. I thought it was emonpi (originally installed using a downloaded image, then migrated to a Western Digital PiDrive) but there’s no update menu link! Guess I’ll have to update manually.