Moved template directory and page not loading properly

Post Reply
LuisB
Newbie
Newbie
Posts: 4
Joined: Sun Feb 07, 2021 4:18 pm
Station model: WS1401IP
Software: Meteobridge

Moved template directory and page not loading properly

Post by LuisB » Fri Mar 05, 2021 8:58 pm

I loaded my files under the root/template/template. I wanted to move it one directory up, ie root/template, so I took all the directories and files and move them, then ran the installation/setup.php to correct the path. After doing this, launch the index.php under root/template and it no longer loads the page properly. Initially had a cache write error, so made everything writable and error went away, but still does not load correctly. Hate to have to reinstall and then overwriting the critical php files in some areas.
Attachments
Webpage bad.jpg
Webpage bad.jpg (50.29 KiB) Viewed 5302 times

davidefa
Expert
Expert
Posts: 905
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Moved template directory and page not loading properly

Post by davidefa » Fri Mar 05, 2021 9:25 pm

What is the url of your site?
Image

LuisB
Newbie
Newbie
Posts: 4
Joined: Sun Feb 07, 2021 4:18 pm
Station model: WS1401IP
Software: Meteobridge

Re: Moved template directory and page not loading properly

Post by LuisB » Fri Mar 05, 2021 11:05 pm

I designed/completed the meteotemplate for my site right off my local webserver (Synology), no outside URL had been set. In fact what I was trying to do was I now acquired the domain, so I was attempting to publish publicly the site. Since the domain points to my root webserver directory, I thought that by copying everything from the template directory to the root will do it, and how I broke it. Later I found a post that replaces the root index file mapping it to the /template Index.php, but too late, damage had been done.

davidefa
Expert
Expert
Posts: 905
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Moved template directory and page not loading properly

Post by davidefa » Fri Mar 05, 2021 11:55 pm

I don't think you damaged anything, maybe something misconfigured.
Check your config.php ( in the meteotemplate root directory ), near line 19 you should have:

Code: Select all

$path = '/template/';
$pageURL = 'http://localhost';
Variable $path should have leading and trailing slash ( in your case should be exactly '/template/' ), and should be the only thing to change.
Image

LuisB
Newbie
Newbie
Posts: 4
Joined: Sun Feb 07, 2021 4:18 pm
Station model: WS1401IP
Software: Meteobridge

Re: Moved template directory and page not loading properly

Post by LuisB » Sat Mar 06, 2021 12:43 am

Checked that, looks fine, it shows the directory of my files and the IP of my local webserver. I can even bring the /install/setup.php and parameters are OK. Appreciate the help !!

davidefa
Expert
Expert
Posts: 905
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Moved template directory and page not loading properly

Post by davidefa » Sat Mar 06, 2021 10:12 am

Zip the html source code of the indexDesktop.php and attach it here ( on firefox right-click->'wiev page source' )
Or you can compare with mine.
Even if the blocks loaded are different, the structure should be the same.
A program like winmerge ( I prefer kdiff3 ) could be used to spot the differences.

P.S.
Are you accessing your site via https?
I have the same result accessing my site ( in my signature ): everything is ok using http://realrunning.netsons.org/template ... esktop.php but I get a 'broken page' ( like yours ) if I use https://realrunning.netsons.org/templat ... esktop.php
Surely some misconfiguration from my part
Attachments
http _localhost_template_indexDesktop.php.zip
(22.75 KiB) Downloaded 368 times
Image

LuisB
Newbie
Newbie
Posts: 4
Joined: Sun Feb 07, 2021 4:18 pm
Station model: WS1401IP
Software: Meteobridge

Re: Moved template directory and page not loading properly

Post by LuisB » Sat Mar 06, 2021 3:53 pm

Figured it out based on your file and inspecting my page after loaded. I was missing the "/" after template. Edited my config.php and voila !!! THANKYOU!!!

Post Reply