Forums

404 css not found

SpaceCowboy 28 Oct, 2009
Hello,
Im having a little problem accessing my registration page from a menu item.
My registration page loads successfully, the issue is that my form does not have the site CSS loaded.

I notice that the base URL used to locate the CSS is incorrect.

looking at the forums i noticed some mention of SEF and so i disabled this from my global configuration after which the page loads successfully with styling but horrid URLs.

When i turn that SEF flag back on, it produces an incorrect URL for the site CSS and i get a registration page without any styling BUT a nice registration page URL.

Do you know how i can have nice looking URLs for my registration page AND my CSS loading correctly?

Thanks in advance
GreyHead 28 Oct, 2009
Hi SpaceCowboy,

Please can you post a link to the form - or at least tell us how the CSS link is incorrect??

Hard to diagnose without more info.

Bob
SpaceCowboy 29 Oct, 2009
Heh sorry, was a long day..
So when SEF is turned off, looking at the source for the form the CSS location is:
<link rel="stylesheet" href="/<my_hostnmae>/templates/frontpage_grey/css/style.css" type="text/css" />
<link rel="stylesheet" href="/<my_hostname>/templates/p_grey/css/style.css" type="text/css" />

When i then turn SEF on, the CSS location is:
<link rel="stylesheet" href="/<my_hostname>/index.php/templates/frontpage_grey/css/style.css" type="text/css" />
<link rel="stylesheet" href="/<my_hostname>/index.php/templates/p_grey/css/style.css" type="text/css" />

In this instance the CSS root URL is no longer the hostname but the index.php page.
GreyHead 29 Oct, 2009
Hi SpaceCowboy,

:-( looks like there's a problem either with the SEF generator or - more likely - with the way the css is called from your template.

Bob
SpaceCowboy 29 Oct, 2009
I use this for my template to load the CSS
<link rel="stylesheet" href="templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="templates/frontpage_grey/css/style.css" type="text/css" />
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/style.css" type="text/css" />
SpaceCowboy 29 Oct, 2009
I altered it slightly to include the baseURL command but this still does not work in SEF mode

<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/frontpage_grey/css/style.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/css/style.css" type="text/css" />
GreyHead 29 Oct, 2009
Hi SpaceCowboy,

That looks fine - so your SEF generator is doing something weird with the links.

Bob

BTW: nothing to do with ChronoForms as far as I can see.
SpaceCowboy 29 Oct, 2009
K. will do some digging and see what others have said elsewhere
Thanks for the quick repsonses
SpaceCowboy 30 Oct, 2009
Sort of solved, but its not chronoforms.
i realised it was my site_url varible in configuration.php. it was empty so i set it to my sitename. the forms now load successfully just that on the first form, when you submit, it reloads the form again. You fill it in the second time and it then goes to the second form.
This topic is locked and no more replies can be posted.