Dashboard not saving - White box

HI all,

I installed EmonCMS, from a clone github all went sort of ok, 
Redis was a bit of pain, but that's now installed and working, so most of EmonCMS is working.

I'm using mysql/apache/on Centos 5.x

Data in and feeds all went well via csv JSON from the ardunio which is connected to some weather instruments (work in progress)

 

I can create a nice funky dashboard, I save each part (the save button changes from yellow to green.)  and publish the dash.

but when I go back, it's gone..?!?!   Just a white box.  A new dash, the same happens.

Looking in php.error.log dosen't show any drama, nor do the apache logs..

A quick browse into MySQL shows stuff in the dashboard table....so it's there???

 

ermm,,, where next? -

 

MarkA

 

 

TrystanLea's picture

Re: Dashboard not saving - White box

I wonder if there could be any errors shown in the javascript console window of your browser? what browser are you using?

Mark007's picture

Re: Dashboard not saving - White box

Hello, thanks for the reply, and the pointer.

Browser is Firefox 27.0.1 en_GB on Win7x64

The webdev console shows some stuff which may be a pointer, I know nada about programing (I did some assembler at college 30 years ago !) and less about Java...

 

 

MarkA

 

 

23:03:21.342 GET http://cloisters-svr05.local/emoncms/dashboard/view&id=1 [HTTP/1.1 200 OK 14ms]
23:03:21.326 Use of getUserData() or setUserData() is deprecated.  Use WeakMap or element.dataset instead. requestNotifier.js:64
23:03:21.467 GET http://cloisters-svr05.local/emoncms/Modules/dashboard/dashboard_langjs.php [HTTP/1.1 200 OK 1ms]
23:03:21.353 SyntaxError: Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery-1.9.0.min.js:4
23:03:21.353 Error: http://cloisters-svr05.local/emoncms/Lib/jquery-1.9.0.min.js is being assigned a //# sourceMappingURL, but already has one
23:03:21.364 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:12
23:03:21.364 Unknown property 'box-sizing'.  Declaration dropped. bootstrap.css:40
23:03:21.364 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:60
23:03:21.364 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:61
23:03:21.364 Expected colour but found 'auto'.  Expected colour but found '-webkit-focus-ring-color'.  Expected end of value but found '-webkit-focus-ring-color'.  Error in parsing value for 'outline'.  Declaration dropped. bootstrap.css:76
23:03:21.364 Error in parsing value for 'width'.  Declaration dropped. bootstrap.css:102
23:03:21.364 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:126
23:03:21.364 Unknown property 'box-sizing'.  Declaration dropped. bootstrap.css:158
23:03:21.364 Unknown pseudo-class or pseudo-element '-webkit-search-decoration'.  Ruleset ignored due to bad selector. bootstrap.css:162
23:03:21.364 Unknown property '-moz-border-radius'.  Declaration dropped. bootstrap.css:246
23:03:21.364 Unknown property '-moz-box-shadow'.  Declaration dropped. bootstrap.css:256
23:03:21.364 Unknown property '-moz-border-radius'.  Declaration dropped. bootstrap.css:262
23:03:21.364 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:268
23:03:21.364 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:393
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:413
23:03:21.365 Unknown property 'box-sizing'.  Declaration dropped. bootstrap.css:416
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:429
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:434
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:439
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:444
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:449
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:454
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:459
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:464
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:469
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:474
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:479
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:484
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:489
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:494
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:499
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:504
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:509
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:514
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:519
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:524
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:529
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:534
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:539
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:544
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:549
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:554
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:559
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:564
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:569
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:574
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:579
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:584
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:589
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:594
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:599
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:604
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:620
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:637
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:844
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:847
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:868
23:03:21.365 Unknown property '-moz-border-radius'.  Declaration dropped. bootstrap.css:979
23:03:21.365 Unknown property '-moz-border-radius'.  Declaration dropped. bootstrap.css:1005
23:03:21.365 Unknown property '-moz-border-radius'.  Declaration dropped. bootstrap.css:1102
23:03:21.365 Unknown property '-moz-box-shadow'.  Declaration dropped. bootstrap.css:1135
23:03:21.365 Expected colour but found 'thin'.  Expected colour but found 'dotted'.  Expected colour but found '\9 '.  Expected end of value but found '\9 '.  Error in parsing value for 'outline'.  Declaration dropped. bootstrap.css:1161
23:03:21.365 Unknown property '-moz-box-shadow'.  Declaration dropped. bootstrap.css:1165
23:03:21.365 Expected end of value but found '\9 '.  Error in parsing value for 'margin-top'.  Declaration dropped. bootstrap.css:1172
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:1173
23:03:21.365 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:1192
23:03:21.365 Expected colour but found 'auto'.  Expected colour but found '-webkit-focus-ring-color'.  Expected end of value but found '-webkit-focus-ring-color'.  Error in parsing value for 'outline'.  Declaration dropped. bootstrap.css:1214
23:03:21.365 Unknown property '-moz-box-shadow'.  Declaration dropped. bootstrap.css:1225
23:03:21.365 Unknown pseudo-class or pseudo-element '-ms-input-placeholder'.  Ruleset ignored due to bad selector. bootstrap.css:1244
23:03:21.366 Unknown pseudo-class or pseudo-element '-webkit-input-placeholder'.  Ruleset ignored due to bad selector. bootstrap.css:1249
23:03:21.366 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.css:1416
23:03:22.574 GET http://cloisters-svr05.local/emoncms/dashboard/%5C%22%5C%5C%22http://clo... [HTTP/1.1 200 OK 6ms]
23:03:22.574 GET http://cloisters-svr05.local/emoncms/dashboard/%5C%22http://cloisters-sv... [HTTP/1.1 200 OK 7ms]
23:03:22.575 GET http://cloisters-svr05.local/emoncms/feed/list.json [HTTP/1.1 200 OK 14ms]
23:03:21.666 Use of getUserData() or setUserData() is deprecated.  Use WeakMap or element.dataset instead. requestNotifier.js:64
23:03:21.680 SyntaxError: Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery-1.9.1.min.js:1
23:03:21.684 Error: http://cloisters-svr05.local/emoncms/Lib/jquery-1.9.1.min.js is being assigned a //# sourceMappingURL, but already has one
23:03:21.705 SyntaxError: Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery-1.9.1.min.js:1
23:03:21.709 Error: http://cloisters-svr05.local/emoncms/Lib/jquery-1.9.1.min.js is being assigned a //# sourceMappingURL, but already has one
23:03:21.724 Expected declaration but found '*'.  Skipped to next declaration. bootstrap.min.css:9
23:03:21.724 Unknown property '-moz-box-shadow'.  Declaration dropped. bootstrap.min.css:9
23:03:21.724 Unknown property '-moz-border-radius'.  Declaration dropped. bootstrap.min.css:9
23:03:21.724 Unknown property '-moz-border-radius-bottomleft'.  Declaration dropped. bootstrap.min.css:9
23:03:21.724 Unknown property '-moz-border-radius-topleft'.  Declaration dropped. bootstrap.min.css:9
23:03:21.724 Unknown property '-moz-border-radius-topright'.  Declaration dropped. bootstrap.min.css:9
23:03:21.724 Unknown property '-moz-border-radius-bottomright'.  Declaration dropped. bootstrap.min.css:9
23:03:21.725 Expected 'none' or URL but found 'alpha('.  Error in parsing value for 'filter'.  Declaration dropped. bootstrap.min.css:9
23:03:21.725 Error in parsing value for 'background-image'.  Declaration dropped. bootstrap.min.css:9
23:03:21.725 Expected 'none' or URL but found 'progid'.  Error in parsing value for 'filter'.  Declaration dropped. bootstrap.min.css:9
23:03:21.725 Expected end of value but found '\9 '.  Error in parsing value for 'background-color'.  Declaration dropped. bootstrap.min.css:9
23:03:21.726 Unknown pseudo-class or pseudo-element '-ms-input-placeholder'.  Ruleset ignored due to bad selector. bootstrap.min.css:9
23:03:21.726 Unknown pseudo-class or pseudo-element '-webkit-input-placeholder'.  Ruleset ignored due to bad selector. bootstrap.min.css:9
23:03:21.726 Unknown property '-moz-background-clip'.  Declaration dropped. bootstrap.min.css:9
23:03:21.727 Unknown property 'zoom'.  Declaration dropped. bootstrap.min.css:9
23:03:21.727 Unknown property 'box-sizing'.  Declaration dropped. bootstrap.min.css:9
23:03:21.727 Unknown property '-moz-background-size'.  Declaration dropped. bootstrap.min.css:9
23:03:21.774 Use of getPreventDefault() is deprecated.  Use defaultPrevented instead. jquery-1.9.0.min.js:2
23:03:21.938 Unknown property 'box-sizing'.  Declaration dropped. realtime
23:03:22.009 Unknown property 'box-sizing'.  Declaration dropped. realtime

 

p.s. the record is MySQL is thus...

 

<div type=\"\\&quot;\\&quot;\" units=\"\\&quot;\\&quot;\" scale=\"\\&quot;0\\&quot;\" max=\"\\&quot;160\\&quot;\" feed=\"\\&quot;WindSpeed\\&quot;\" id=\"\\&quot;2\\&quot;\" class=\"\\&quot;dial\\&quot;\" style=\"\\&quot;position:\" absolute;=\"\" margin:=\"\" 0px;=\"\" top:=\"\" 40px;=\"\" left:=\"\" 360px;=\"\" width:=\"\" 140px;=\"\" height:=\"\" 120px;\\\"=\"\"><canvas height=\"\\&quot;120\\&quot;\" width=\"\\&quot;140\\&quot;\" id=\"\\&quot;can-2\\&quot;\"></canvas></div><div feedid=\"\\&quot;4\\&quot;\" id=\"\\&quot;3\\&quot;\" class=\"\\&quot;realtime\\&quot;\" style=\"\\&quot;position:\" absolute;=\"\" margin:=\"\" 0px;=\"\" top:=\"\" 20px;=\"\" left:=\"\" 580px;=\"\" width:=\"\" height:=\"\" 300px;\\\"=\"\"><iframe style=\"\\&quot;width:\" 580px;=\"\" height:=\"\" 300px;\\\"=\"\" marginheight=\"\\&quot;0\\&quot;\" marginwidth=\"\\&quot;0\\&quot;\" src=\"\\&quot;http://cloisters-svr05.local/emoncms/vis/realtime?embed=1&amp;feedid=4\\&quot;\" frameborder=\"\\&quot;0\\&quot;\" scrolling=\"\\&quot;no\\&quot;\"></iframe></div><div type=\"2\" units=\"\" scale=\"\" max=\"160\" feed=\"WindSpeed\" id=\"2\" class=\"dial\" style=\"position: absolute; margin: 0px; top: 20px; left: 480px; width: 140px; height: 120px;\"><canvas height=\"120\" width=\"140\" id=\"can-2\"></canvas></div><div type=\"8\" units=\"C\" scale=\"\" max=\"40\" feed=\"Temp\" id=\"3\" class=\"dial\" style=\"position: absolute; margin: 0px; top: 20px; left: 320px; width: 140px; height: 120px;\"><canvas height=\"120\" width=\"140\" id=\"can-3\"></canvas></div><div type=\"6\" units=\"\" scale=\"\" max=\"360\" feed=\"WindDirection\" id=\"5\" class=\"dial\" style=\"position: absolute; margin: 0px; top: 20px; left: 760px; width: 120px; height: 120px;\"><canvas height=\"120\" width=\"120\" id=\"can-5\"></canvas></div><div feedid=\"4\" id=\"6\" class=\"realtime\" style=\"position: absolute; margin: 0px; top: 140px; left: 460px; width: 440px; height: 220px;\"><iframe style=\"width: 440px; height: 220px;\" marginheight=\"0\" marginwidth=\"0\" src=\"http://cloisters-svr05.local/emoncms/vis/realtime?embed=1&amp;feedid=4\" frameborder=\"0\" scrolling=\"no\"></iframe></div><div type=\"2\" units=\"\" scale=\"\" max=\"160\" feed=\"WindGust\" id=\"7\" class=\"dial\" style=\"position: absolute; margin: 0px; top: 20px; left: 620px; width: 120px; height: 120px;\"><canvas height=\"120\" width=\"120\" id=\"can-7\"></canvas></div>

 

Mark007's picture

Re: Dashboard not saving - White box

Hello Again...

All the "\" in the above are the cause of the problem..  (did some manually editing of the record in the dashboard table and voila!)

How did I come to this plan of attack ?  -  I installed another browser, and saw in the box a url not found error with a "\" proceeding the http.. 

Next question, where's all the "\" being inserted ?

 

MarkA

 

 

Mark007's picture

Re: Dashboard not saving - White box

Another update,

I found this,

http://openenergymonitor.org/emon/node/2762

I've done what was suggested, but more problems, will investigate later...

 

 

MarkA

 

Mark007's picture

Re: Dashboard not saving - White box

 

Two more things we had to do....

Apply patch  https://github.com/caseee/emoncms/commit/60d820d863bc3ff459d051344ba1177...

Then I was seeing time errors ""We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone."

 

so http://openenergymonitor.org/emon/node/2746 came into play.

 

RESOLVED.

TrystanLea's picture

Re: Dashboard not saving - White box

Good to see you've got it fixed!

did setting magic_quotes_gpc = Off work? or did you need to add the stripslashes command to make it work?

TrystanLea's picture

Re: Dashboard not saving - White box

I've just experienced the same problem installing emoncms on a shared server. The problem occurs on servers with an older version of php installed. As of php version 5.4 magic quotes has been removed.

I've added the stripslashes workaround call to the core get and post functions in the rework development branch here:

https://github.com/emoncms/emoncms/commit/91dc754eb5f435e2f67235f8822da0...

The get and post function now looks like this:

function get($index)
{
    $val = null;
    if (isset($_GET[$index])) $val = $_GET[$index];
   
    if (get_magic_quotes_gpc()) $val = stripslashes($val);
    return $val;
}

This fixed the problem in the dashboards but also anywhere else a json string is passed to emoncms, such as in the new node module.

In php5.4 get_magic_quotes_gpc() always returns false and so $val = stripslashes($val); will never be called as its not needed.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.