Page 1 of 1
New Website Problem
Posted: Mon 08 Mar 2021 3:41 pm
by Derekg0pgl
Hello
I have installed the latest version of CumulusMX from the downloadable image to my Raspberry Pi3 B+.
I transferred my existing Data directory and Cumulus.ini and strings.ini files to
the new build.
I also copied over the contents of the new webfiles directory to /public_html/CumulusMX on my web site.
The program is working fine except for the webpage, although the new template is displaying on my webpage, only the Charts and Gauges sections are working, also the moon image is showing.
But no data is is being displayed on any other page.
Have I missed something?
I did tick the " I want to use the default web site box "
Derek
Re: New Website Problem
Posted: Mon 08 Mar 2021 4:44 pm
by mcrossley
A link to your web site would be helpful if you can provide one.
Re: New Website Problem
Posted: Mon 08 Mar 2021 7:47 pm
by Derekg0pgl
Re: New Website Problem
Posted: Mon 08 Mar 2021 8:14 pm
by Derekg0pgl
Here is my ftp log file.
ftplog.zip
Re: New Website Problem
Posted: Mon 08 Mar 2021 9:01 pm
by ConligWX
Mark, when you "inspect" that page and goto console I get:
2setpagedata.js:161 Data Request Failed: parsererror, SyntaxError: Unexpected token M in JSON at position 827
8setpagedata.js:161 Data Request Failed: parsererror, SyntaxError: Unexpected token M in JSON at position 827
websitedata.json file is however there.
http://www.valder.co.uk/CumulusMX/websitedata.json
Derek, have you changed anything in the webpages at all?
Re: New Website Problem
Posted: Tue 09 Mar 2021 8:53 am
by mcrossley
Ah, the forecast string is the culprit.
it is...
Code: Select all
""Mostly clear and cooler. " """""
Or the actual string is...
The string itself stars with a quote character, and there are lots of other quotation characters in it that are messing up the JSON. Depends on whether that is coming from a thrid party source or MX. Third party would need looking at, if it is from MX, then I suspect the strings.ini has got some invalid entries in it.
CMX should really be HTML escaping any text to avoid that, I'll take look at fixing it.
Re: New Website Problem
Posted: Tue 09 Mar 2021 8:56 am
by mcrossley
A quick fix!
Edit /web/websitedataT.json
At line 35, change...
to
Re: New Website Problem
Posted: Tue 09 Mar 2021 12:08 pm
by Derekg0pgl
"Brilliant" The fix worked a treat.
Many thanks to Mark and Simon for there very quick responses.
Derek
Re: New Website Problem
Posted: Tue 09 Mar 2021 12:34 pm
by mcrossley
Great, now you just need to fix your forecast strings. I suspect you have an "old" strings.ini created from a samplestrings.ini some time ago, the format changed slightly for some entries - mainly the forecast strings iirc. Compare it with the samplestrings.ini that comes with the distribution.
Re: New Website Problem
Posted: Tue 09 Mar 2021 4:43 pm
by Derekg0pgl
Thanks Mark.
strings.ini now updated.
Derek