Page 1 of 1

MX Interface

Posted: Mon 12 Sep 2022 6:35 am
by griffo42
On the index page of the interface, I have altered the coding to include the BOM Australia forecast for Brisbane rather than showing the computed forecast. This forecast is changed twice daily by the BOM but the latest forecast does not appear unless I clear the cache. Is there any way that I can code this to cause the latest forecast to be shown. BTW the MX.ai interface acts in the same way!

My coding for this (start at line 229) is in the zipped file attached.

Keith

Re: MX Interface

Posted: Thu 18 May 2023 9:45 pm
by griffo42
Please see the attachment below and notice the extra characters around temperature reportings. Can some one tell me how to fix this please. ? php version used on by my ISP?
Screenshot 2023-05-19 073414.png
Thanks
Keith
https://kstwx.net/cumx/index.htm

Re: MX Interface

Posted: Fri 19 May 2023 9:09 am
by flort
Hi Keith,

I don't know how to fix your forecast but your temperature unit is coming from your websitedata.json file. The output from processing this file displays "tempunit":"°C"

Regards,
Trevor

Re: MX Interface

Posted: Fri 19 May 2023 11:54 am
by mcrossley
Do you have "Enable UTF-8 encoding" enabled under: Internet Settings > Web/Upload Site > General Settings?

Re: MX Interface

Posted: Sat 20 May 2023 1:56 am
by griffo42
@mcrossley. Thanks for your reply. Yes, this was enabled. Re-saved those settings to try to make sure and after the re-save there is no change.

Keith

Re: MX Interface

Posted: Sat 20 May 2023 10:05 pm
by mcrossley
Have you edited the websitedataT.json file at any point?

Re: MX Interface

Posted: Sun 21 May 2023 4:50 am
by griffo42
mcrossley wrote: Sat 20 May 2023 10:05 pm Have you edited the websitedataT.json file at any point?
No. BTW the encoding for this file is UTF-8 and Windows (CR LF).

Keith

Re: MX Interface

Posted: Tue 23 May 2023 9:11 am
by mcrossley
No. BTW the encoding for this file is UTF-8 and Windows (CR LF).
The file in the distribution .zip has Unix line endings (LF), so if the file is now CRLF has been altered. I'd try restoring the original from the zip file.

If that does not work, then I'm out of ideas. Something is presenting the UTF-8 data as "non-UTF8" somewhere.

Re: MX Interface

Posted: Tue 23 May 2023 11:08 am
by griffo42
mcrossley wrote: Tue 23 May 2023 9:11 am
No. BTW the encoding for this file is UTF-8 and Windows (CR LF).
The file in the distribution .zip has Unix line endings (LF), so if the file is now CRLF has been altered. I'd try restoring the original from the zip file.

If that does not work, then I'm out of ideas. Something is presenting the UTF-8 data as "non-UTF8" somewhere.
Thanks for your help. Yes, I have done all of that with no joy!

Could it be anything to do with the version of PHP that is used by my ISP To process Cumulus files? In any event, could you please tell me the recommended version of PHP I should set in cPanel; it is currently 7.3?

Keith

Re: MX Interface

Posted: Wed 24 May 2023 12:16 pm
by mcrossley
PHP version shouldn't affect anything.

What upload mechanism are you using - FTP or PHP?

Re: MX Interface

Posted: Wed 24 May 2023 12:23 pm
by mcrossley
You have another web site - https://www.kstwx.net/cumx/index.htm - and the websitedata,json file for that site is OK.

Is that being fed by a different instance of CMX?

Re: MX Interface

Posted: Wed 24 May 2023 1:57 pm
by broadstairs
I just took a look at all the linked websites shown and none show anything like that initial screenshot. Am I missing something? This is using the Kiwi browser.

Stuart

Re: MX Interface

Posted: Wed 24 May 2023 2:01 pm
by PaulMy
Looking at all 3 URL's in your signature, and they all appear fine from here.

Enjoy,
Paul

Re: MX Interface

Posted: Wed 24 May 2023 2:55 pm
by mcrossley
Yep, looked like it is fixed. What was the solution?

Re: MX Interface

Posted: Wed 24 May 2023 11:07 pm
by griffo42
It ended up being that I did not have a tick in the UTF-8 column in the extra files settings for the website data T.json file. I have always had the the general settings UTF-8 one ticked.

Thanks again everybody for your help.


Keith