Jump to content

Recommended Posts

Posted

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

Posted

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

  • Like 1
Posted

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

Posted

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/

Posted

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 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...