Community
OpenEnergyMonitor

Community

Dashboard can no longer be edited, update did not bring success


(Luigi) #1

Dashboard can no longer be edited, update did not bring success
Fehler
Add a Text element to the dashboard (paragraph)
I’m using a java script to show the time and date here
paragraph_Fehler3
Add a Widgets element to the dashboard (thresholds)
paragraph_Fehler2
after calling the function, the system displays the error message
Fehler1
EmonBase, EmonCMS self hosted

Server Information
Emoncms Version low-write 9.9.6-beta
Modules Administration : App v1.2.0 : Backup v1.1.6 : EmonHub Config v1.0.0 : Dashboard v1.3.1 : Device v1.2.0 : EventProcesses : Feed : Graph v1.2.1 : Input : Postprocess v1.0.0 : CoreProcess : Schedule : Network Setup v1.0.0 : sync : Time : User : Visualisation : WiFi v1.3.0
Git URL https://github.com/emoncms/emoncms.git
Git Branch * master
Buffer loading…
Writer Daemon is running with sleep 60s
Server OS Linux 4.9.35-v7+
Host emonpi emonpi (10.255.255.25)
Date 2019-01-06 15:41:10 CET
Uptime 15:41:10 up 17 min, 0 users, load average: 0,15, 0,25, 0,18
HTTP Server Apache/2.4.10 (Raspbian) HTTP/1.1 CGI/1.1 80
MySQL Version 5.5.62-0+deb8u1
Host localhost (127.0.0.1)
Date 2019-01-06 15:41:10 (UTC 01:00‌​)
Stats Uptime: 1008 Threads: 3 Questions: 2812 Slow queries: 0 Opens: 92 Flush tables: 1 Open tables: 85 Queries per second avg: 2.789
Redis Version 2.8.17
Host localhost:6379 (127.0.0.1)
Size 483 keys (543.64K)
Uptime 0 days
MQTT Server Version Mosquitto 1.4.14
Host localhost:1883 (127.0.0.1)
Pi Model Raspberry Pi 3 Model B Rev 1.2 - 1 GB (Sony UK)
SoC Broadcom BCM2835
Serial num. 8637051D
Temperature CPU: 46.16°C - GPU: 46.7’C
Release emonSD-07Nov16
File-system Current: read-only - Set root file-system temporarily to read-write, (default read-only)
Memory RAM Used: 28,00% Total: 970,93 MB Used: 271,85 MB Free: 699,08 MB
Disk Mount Stats
/ Used: 58,95% Total: 4,86 GB Used: 2,87 GB Free: 1,77 GB
/boot Used: 36,32% Total: 59,95 MB Used: 21,77 MB Free: 38,17 MB
/home/pi/data Used: 6,62% Total: 22,95 GB Used: 1,52 GB Free: 20,24 GB
PHP Version 5.6.39-0+deb8u1 (Zend Version 2.6.0)
Modules apache2handler : bcmath : bz2 : calendar : Core v5.6.39-0+deb8u1 : ctype : curl : date v5.6.39-0+deb8u1 : dba : dio v0.0.4RC4 : dom v20031129 : ereg : exif v1.4 $Id: cad29b729548e4206f0697710cc9e177f26fdff3 $ : fileinfo v1.0.5 : filter v0.11.0 : ftp : gettext : hash v1.0 : iconv : json v1.3.6 : libxml : mbstring : mcrypt : mhash : mosquitto v0.3.0 : mysql v1.0 : mysqli v0.1 : openssl : pcre : PDO v1.0.4dev : pdo_mysql v1.0.2 : Phar v2.0.2 : posix : readline v5.6.39-0+deb8u1 : redis v2.2.7 : Reflection v$Id: 5f15287237d5f78d75b19c26915aa7bd83dee8b8 $ : session : shmop : SimpleXML v0.1 : soap : sockets : SPL v0.2 : standard v5.6.39-0+deb8u1 : sysvmsg : sysvsem : sysvshm : tokenizer v0.1 : wddx : xml : xmlreader v0.1 : xmlwriter v0.1 : Zend OPcache v7.0.6-devFE : zip v1.12.5 : zlib v2.0
Client Information
HTTP Browser Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Screen Resolution 1920 x 1080
Window Size 1903 x 939

(Brian Orpin) #2

How did you update?
Did you check the database for updates?
Try the page in a ‘private’ window and if that works clear the browser cache.


(Luigi) #3

@borpin, I had the V9.8.30 on it with the mentioned error, the update to V9.9.5 was done with the EmonBase update button, the database was checked but there was nothing to do.
After that I deleted the browser cache and rebooted the EmonBase, but the error was immediately reproducible.
An update via the terminal to V9.9.6-beta was not successful either

My second EmonBase (test system) has exactly the same bug, this is currently installed with V9.9.5.

Since I haven’t had to modify the dashboard for a long time, I only noticed it last week, the last dashboard modification I had as far as I can remember under Emoncms V9.8.24.

If I delete the text element (paragraph), the dashboard can be edited and saved again. But inserting a new Parargaph text element with content a clock as Java Script is aborted with the error message.
Regardless of this, the thresholds widget error will show up as soon as I press Save.


(Paul) #4

Take a look at issue https://github.com/emoncms/dashboard/issues/171 it may well be related.

Can you post the content of your text box?


(Luigi) #5

here my watch with date java script

08.01.2019
18:07:30

(Paul) #6

I can’t see any obviously stray characters.

Can you inspect the text box widget content in emoncms, compare it in the 2 locations to see if there is any difference, the addition chars that I found were not displayed in the text box widget editing area, but they were present in the dashboard configuration “copy and paste” edit box (see red arrow in 2nd pic)

When I delete the hidden chars from the dashboard configuration editor the dash can then be saved with the new changes. Perhaps you have something similar? The point is you cannot believe what you see in the text box widget editor as it seems to not show these chars. so check for any differences in what is displayed in the dashboard configuration editor, bear in mind this is the complete dashboard content, so you need to hunt out the specific div’s to the text box widget for the clock, I chose a very simple page (and edited the content names to “Example”) so it is easier to locate and demonstrate, it’s not so clear on more complex dashboards.

[edit - Thinking about this some more, I have some vague recollection of there being some restriction put on scripting to reduce the chance of rogue code being injected with copied dashboards. Could it be the script tags that are causing the issue?]

[edit2 - Just did a quick test and found that adding <script></script> to a text box on a dash I am able to edit and save ok without it, is not able to be saved after adding the script tags. Removing them again allows the dash to be saved ok. Seems you can no longer have script tags directly within the dash content.]


(Luigi) #7

Thanks for the information, I will ask smitt1979 in his dashboard a time and date widget has been mentioned


(Luigi) #8

@smitt1979 : in your dashboard you mentioned a time and date widget, i am very interested in it, can you make it available to us?
I’m referring to your dashboard: https://smitt1979.i234.me/emoncms/dashboard/view&id=13 and https://openenergymonitor.org/forum-archive/node/11593.html