AmilcarMarques Posted November 22, 2016 Posted November 22, 2016 Hi, Sorry if this is too basic but it is becoming a big problem. We had a PW 2.2 production site and we had to relocate it recently. Since then the generated absolute URLs are incorrect (one slash is missing) and some files are not accessed, like css files. For instance, in <link rel="stylesheet" type="text/css" href="http://knowledge4foot.eu/inga3dsite/templates/styles/main.css" /> the slash between inga3d and site disappeared. However if I do a page view from the admin side, everything works fine because the generated URLs are relative <link rel="stylesheet" type="text/css" href="/site/templates/styles/main.css" /> Can you help me? Thanks, Amilcar
AndZyk Posted November 22, 2016 Posted November 22, 2016 Welcome @AmilcarMarques, do you have the absolute urls in your template files? If yes, it is better to embed them using the $config->urls->templates method: <link rel="stylesheet" type="text/css" href="<?=$config->urls->templates?>styles/main.css" /> This generates a relative path to your templates directory, similar to the one in admin side. Regards, Andreas 1
AmilcarMarques Posted November 22, 2016 Author Posted November 22, 2016 Hi Andreas, Thanks. The templates do use the $config->url->templates and it is correctly assigned "site/templates/" on the toplevel index.php. However afterwards it seems to be changed somewhere in the code. Any idea on where this might be happening? Thanks, Amilcar
AndZyk Posted November 23, 2016 Posted November 23, 2016 Is inga3d a subfolder inside your PW installation containing an index.php? If yes, it woud be better to create an dedicated template for this site and add an page in PW for it. However you could try to either add ../ to your relative URL, to target the directory, above or ./ to target the root of this domain. So for example: ./site/templates/
AmilcarMarques Posted November 23, 2016 Author Posted November 23, 2016 Hi Andreas, inga3d is the top level folder of the domain and for the PW installation. The way I see it, on initialization everything is fine but somehow later on the variables are changed and get a wrong value. This is curious because if I login as admin everything works ok... Amilcar
adrian Posted November 23, 2016 Posted November 23, 2016 Any ideas why this page is responding the way it is? http://knowledge4foot.eu/inga3d/admin Is that some debugging attempt that is still in place?
AmilcarMarques Posted November 24, 2016 Author Posted November 24, 2016 Hi Adrian, Yes, there was some debugging going on. It should have not stopped the admin page to run, though. Another mistery... Thanks, Amilcar
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now