Page 1 of 1
CSS only loads when IE is refreshed and form problem
Posted: Sun May 01, 2005 4:39 pm
by miss_d_bus
It is a bit of a problem as the CSS does not load properly when accessing my site.
http://www.shepwayonline.co.uk/
However, when it is refreshed, it works okay until i go to the next page. It seems fine in Mozilla Firefox.
I installed the CMS before and it worked fine. When i moved it to another directory and effectively starting from scratch, though using the mySQL contents of the db to create the new db, but changing any old links, its gone funny.
What i am doing is moving a static paged website over to CMS so i know that the HTML and CSS worked then. I rule that out as being an issue. Anyway it is like that in the admin system of the site and not just the front end - but only in IE! Anyone got any ideas? I am using the latest stable version.
The other problem is a bit odd when using a form.
Code: Select all
<FORM ACTION="http://www.a.com/cgi-bin/FormMail.cgi" METHOD="POST" ENCTYPE="x-www-form-encoded">
<input type=hidden name="recipient" value="a@b.co.uk">
<input type=hidden name="subject" value="queries">
<input type=hidden name="redirect" value="blah>
<table border="0" cellpadding="0" cellspacing="0" width="508">
<tr>
<td width="214"><p><b>Name:</b></p></td>
<td width="294"><input type="text" name="name" size="40"></td>
</tr>
<tr>
<td width="214" valign="top"><p><b>Email address:</b></p></td>
<td width="294"><input type="text" name="email" size="40"></td>
</tr>
<tr>
<td width="214"><p><b>Phone number:</b></p></td>
<td width="294"><input type="text" name="phone-no" size="40"></td>
</tr>
<tr>
<td width="214" valign="top"><p><b>What department is your query addressed to?</b></p></td>
<td width="294"><select name="select">
<option>Sales</option>
<option>Advertising</option>
<option>Community</option>
<option>Clubs</option>
<option>News</option>
<option>History</option>
<option>Other</option>
</select></td>
</tr>
<tr>
<td><p><b>Details about your query:</b></p></td>
<td><textarea name="query_detail" cols="31" rows="3"></textarea></td>
</tr>
</table>
<p><input type="submit" value="Submit" name="submit">
<input type="reset" value="Reset" name="reset"></p>
</form>
Some of the form is placed within the textarea box but oddly it works fine on the old site. I have tried manually putting the code into the database by editing the specific table but it still wont work right. Any ideas?
I have gone back to the original site for the time being and perhap wait for the next version of the CMS to come out. After installing the form plugin, its screwed up with incorrect links when I put the new site in a different directory but i'll sort that with a fresh installation when the next version comes out.
Thanks in advance,
Catherine
Re: CSS only loads when IE is refreshed and form problem
Posted: Sun May 01, 2005 4:55 pm
by miss_d_bus
Silly me... There is a Feedback module. I will try that.
The CSS issue still to be resolved though. Can anyone suggest anything?
Thanks,
Catherine
Re: CSS only loads when IE is refreshed and form problem
Posted: Wed May 04, 2005 8:33 am
by BlueRook
I may be way off here, and it has been a really long time since I have played around with javascript, but it might be that you have commented out your first end of script.
You have:
instead of
Re: CSS only loads when IE is refreshed and form problem
Posted: Wed May 04, 2005 10:35 am
by miss_d_bus
yes i have done that but thats so then if the browser does not support javascript, the text dont display on the page. The comments will be ignored if javascript works. It is the same for using tags.
In my template i have this:
Code: Select all
<__script__ type="text/javascript" language="JavaScript">
<!--
var sgi_str_location = 0;
browser_ua = navigator.userAgent;
var sgi_str_location = browser_ua.lastIndexOf("X11");
browser_version= parseInt(navigator.appVersion);
browser_type = navigator.appName;
if (browser_type == "Microsoft Internet Explorer" && (browser_version >= 4) && (sgi_str_location < 5)) {
document.write("<link REL='stylesheet' HREF='style/ie.css' TYPE='text/css'>");
}
else if (browser_type == "Netscape" && (browser_version >= 4) && (sgi_str_location < 5)) {
document.write("<link REL='stylesheet' HREF='style/ns.css' TYPE='text/css'>");
}
else if (browser_type == "Opera" && (browser_version >= 4) && (sgi_str_location < 5)) {
document.write("<link REL='stylesheet' HREF='style/opera.css' TYPE='text/css'>");
}
else if (browser_type == "Netscape" && (browser_version >= 4) && (sgi_str_location >= 5)) {
document.write("<link REL='stylesheet' HREF='style/other.css' TYPE='text/css'>");
}
// --></__script>
However, the CSS doesnt seem to load with a refresh in the admin area either and thats why i am really stumped on this.
At the moment I cannot use this CMS with that problem so have gone back to the static pages I have.
I am hoping when the new version comes out, I will start from scratch and recreate the whole thing as it did work at first. It was when i moved it from one directory to another that it broke. I thought there was a dead link with the CSS but this cant be true as it works after a refresh.
I wonder if this is a bug? Or a "feature" of IE?
Thanks for your assistance.
Regards,
Catherine
Re: CSS only loads when IE is refreshed and form problem
Posted: Thu May 05, 2005 8:15 am
by BlueRook
The is for browsers that don't understand Javascript. The thing is that you have the on that same line as the // -->. The rest of the javascript code on your page doesn't do that -- and that is probably causing other problems on your page.
According to the the W3C it should be handled like the following (or like I mentioned)
Code: Select all
<__script__ type="text/javascript">
<!--
some statements
//-->
</__script>
Leaving that on the comment line may or may not cause issues. You might just humor me and move that code down one line and try it again. I may not help your problem but it will then at least be proper code. As it stands if the standard HTML/CSS code is correct then the CMS should handle it.
Re: CSS only loads when IE is refreshed and form problem
Posted: Thu May 05, 2005 1:05 pm
by miss_d_bus
Thanks for pointing that out.
I will sort that out since i do want my code to be correct - although i havent had the time to go through and validate it all as yet.
I would think idea is correct in why CSS only loads when IE is refreshed but the same problem arises in thw admin area and that isnt using my own stylesheet but the one supplied with the CMS.
Its a puzzle. I can't really test it though at the moment as i got annoyed and removed it and put back the old site!!
funnily enough it all worked before it moved the CMS from one folder to another so I am hoping when i try it all again, i install it and set it up in the place it should be and not move it about as it seemed to break it!
Thanks,
Catherine
Re: CSS only loads when IE is refreshed and form problem
Posted: Fri Aug 19, 2005 3:46 am
by Morlan
sjg/wishy. Are you aware of this issue with IE6 and CSS? Almost every time I login to the admin console it fails to load the external CSS file.
I have also installed CMSMS on a completely different web server and I am having the same CSS problem on that too. I have also tried using 2 other PCs running WinXP SP2 and IE6 - same problem on each. This problem does not relate to FireFox, just Internet Explorer 6.
And it's not only the admin console. Sometimes the main front-end site fails to load the external CSS file so all formatting is lost. A refresh of the page calls the CSS file successfully but this is not ideal. This is a big problem.
When this happens in IE6 I try and go to ‘View source’ to see if CMSMS has generated the code incorrectly. However, IE6 completely ignores this and fails to load notepad! What the hell is with that? I have also tried to Save the page using ‘Save As HTML Only’ so I can view the source but I get an error “The Web page could not be saved because one of its files is missing.” (obviously the CSS file is missing) What the hell is going on!!??
SOLUTION:
Save your Stylesheet as a separate .css file on your web server.
Go to Edit Template>Content and add
If you need to use the Styles dropdown in your WYSIWYG editor (TinyMCE) then you will have to paste in your stylesheet to the Template Stylesheet box. Don’t use the
{stylesheet} tag in the Template Content as the browser will pull two copies of the same stylesheet.
To fix the CSS problem with the admin console:
In
lib/classes/class.admintheme.inc.php, look for the following piece of code:
Replace all the above code with:
This bypasses styles.php and loads style.css straight away. Ah sure, you don't need that bit of code anyway, do you?

?? *cough* .
This seems to fix the problem albeit a temporary solution. Let me know if this works for you guys

Re: CSS only loads when IE is refreshed and form problem
Posted: Fri Aug 19, 2005 7:33 am
by miss_d_bus
oh thats brilliant.
Morlan - thanks ever so much for letting me know on this through my website. it is really appreciated. that was the one thing that stopped me using this CMS. I tried it again with the newer versiion and the fault reappeared but now i have a workaround, i can go back to it

Thats brilliant
Thanks very much.
Catherine
Re: CSS only loads when IE is refreshed and form problem
Posted: Mon May 21, 2007 11:31 am
by miss_d_bus
Related to this thread:
with CMS Made Simple 1.0.6, initially styles would not load at all in the admin area but after getting rid of Albums, it came back - well sort of. It works in Mozilla and opera now but not Internet Explorer 6 except if I refresh the page.
Anyone got a current up to date fix for this? although there is one in this thread, I wonder if it is outdated?
I tried to stop Apache from compressing the CSS files but that did not work this time under Apache 2 so I assume it is not that problem this time as the front end works well.
Cheers,
Catherine
Re: CSS only loads when IE is refreshed and form problem
Posted: Tue Mar 04, 2008 1:40 am
by the.c
I know this is an old topic, but have the same problem with CMSMS 1.2.3 / IE6 on new server. At least.. the admin pages dont show styles until refresh. See also my respons here:
http://forum.cmsmadesimple.org/index.php/topic,15882.0.html
Did anyone find a permanent solution or have a suggestion?
Re: CSS only loads when IE is refreshed and form problem
Posted: Tue Mar 04, 2008 3:34 am
by calguy1000
This thread seems not related to CMS made simple, but related to the content of the template and or page content, and /or to addon modules... Thread moved.
Re: CSS only loads when IE is refreshed and form problem
Posted: Wed Mar 05, 2008 12:39 am
by the.c
The thread I was referring to is not the same problem as I am experiencing indeed. This thread about the css-load problem in IE(6) is exactly the same however: layout display in IE only after refresh with every page I check after logging in to the admin console. Tried every workaround mentioned in the forum (replacing style.php with ../admin/themes/default/css/style.css, fixing the session.save_path) but no luck. Since it occured after I relocated the site I also consider that it might be a problem on server level. Searched and googled a lot but didn't came up with a possible solution. Still open for suggestions..
Re: CSS only loads when IE is refreshed and form problem
Posted: Wed Mar 05, 2008 1:07 am
by the.c
For some reason, some code was referring to a dutch (?) javascript named nl.js in the folder: modules/TinyMCE/tinymce/jscripts/tiny_mce/plugins/simplebrowser/langs/nl.js
There was no such file online indeed, but there wasn't one either in my previous installation (where I didn't have a css refresh problem). In the folder mentioned above I copied the only file which was there (en.js) and renamed it to the ducht variant: nl.js.
Problem solved for displaying in Maxthon2, for some strange reason not in IE6 however. Strange because Maxthon uses the IE engine? Beats me, but I'll keep searching.
Re: CSS only loads when IE is refreshed and form problem
Posted: Wed Mar 05, 2008 11:56 pm
by the.c
And now is my IE6 problem with the admin styles finally solved!
I made the path to the stylesheet in the admin/themes/default/defaultTheme.php file absolute. So no referring to style.php but to
http://www.myurl.com/admin/themes/default/css/style.css . I remember trying to make an absolute path to the style.css file (instead of a relative one to style.php) in another file (which I read somewhere on this forum) which didn't do the trick for me. But this was the file I needed for this workaround.
Hope it will help someone else!
Re: CSS only loads when IE is refreshed and form problem
Posted: Sun Apr 13, 2008 8:16 pm
by Sonya
I encounter the same problem on my server when users come with IE7. I have also screenshots from them, where I can see that no css is loaded. However the css is loaded when the site is refreshed. I tryed the solution with absolut link to static css stylesheet and now I am wait for feedback for my users.
Any idea, why it happens?