Main page doesn't get styled

Having trouble installing serendipity?
jeffmeden
Regular
Posts: 8
Joined: Mon Nov 03, 2003 6:59 am
Location: Columbus, OH

Main page doesn't get styled

Post by jeffmeden »

I recently activated a godaddy free hosting account with a domain I own, and tried to upload s9y to it for blogging. The installation went smoothly but the main page shows up in plain text, no css rendering is taking place. What's strange is that the admin section looks fine, i can even change templates and everything looks great, I can add/edit posts but on the main page it still has no CSS! If you want to see for yourself, go to http://meden.us, look at it, and then click the open login screen link and it will look fine.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Main page doesn't get styled

Post by garvinhicking »

Hi!

Your godaddy free hosting includes a HTML ad code:

Code: Select all

</object></layer></span></div></table></body></html><!-- adsok -->
<script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'></script>
On every page. Even on your CSS URL:

http://meden.us/index.php?/serendipity.css

This disturbs the layout of your startpage. You must find a way to get rid of that HTML Ad code, or else the CSS cannot be loaded.

You might be able to work around this by saving your CSS code as a "mystyle.css" file and load that in the HTML head of your index.tpl template instead of the dynamic CSS created by serendipity. You will loose the ability to change templates on the fly, and loose plugins injecting CSS dnyamically in your stylesheet, but you will get a layout.

The more appropriate way would be to ask godaddy not to insert their adcode in pages that do not have "Content-Type: text/html" headers.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jeffmeden
Regular
Posts: 8
Joined: Mon Nov 03, 2003 6:59 am
Location: Columbus, OH

Post by jeffmeden »

That seems to make sense for the main page, but how does the admin section have no problem with it? All of the admin pages show up as they should, I can even change templates and the admin login and subpages all look great.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

What is the URL of your admin CSS? It might be because the admin CSS has a "/*" at the end, or because it is delivered as the real CSS file without using URL rewriting through index.php.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jeffmeden
Regular
Posts: 8
Joined: Mon Nov 03, 2003 6:59 am
Location: Columbus, OH

Post by jeffmeden »

The admin css file gets totally rewritten, since the css file for the main page technically exists and the admin one doesnt (i think). Alas, I don't mind to drop a few dollars for an ad-free account anyway so it's a non-issue.

If you have any plans of improving this I would be happy to test, i have another idle domain I could use.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Maybe you could view in the generated HTML source of your admin backend, and check the <link rel="stylesheet"> URL and compare that with how it looks on your frontend?

I actually think that this way of inserting the banner does disturb a lot of pages, so maybe godaddy.com should be notified of this? Independently of s9y...

You should be able to fix the behaviour if you just edit the index.tpl file of your template and set the <link rel=> to the full path of your CSS style.css file? [with the mentioned drawbacks]

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jeffmeden
Regular
Posts: 8
Joined: Mon Nov 03, 2003 6:59 am
Location: Columbus, OH

Post by jeffmeden »

here are the two sheet references. The only thing i can think of is that they are rendered differently based on their filename since 'serendipity.css*' exists but the other does not. I haven't looked at the details of the rewriting in php.

Code: Select all

<link rel="stylesheet" type="text/css" href="http://meden.us/index.php?/serendipity.css" />

<link rel="stylesheet" type="text/css" href="http://meden.us/index.php?/serendipity_admin.css" />

Now I don't mean to tell anyone how to do their job, but in my opinion if something can be improved on the more flexible side (s9y in this case) then that's where the fix belongs (not that I don't think the godaddy ad delivery is nauseating).
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Betcha they periodically check for new text files and add their little snippet to them. Can you grab the .css file through FTP and manually examine it?
Judebert
---
Website | Wishlist | PayPal
love
Posts: 1
Joined: Wed Aug 09, 2006 5:48 am

Post by love »

I also experience like that, but I use paid hosting...

http://www.cinta.net.ru/start.php
jeffmeden
Regular
Posts: 8
Joined: Mon Nov 03, 2003 6:59 am
Location: Columbus, OH

Post by jeffmeden »

judebert wrote:Betcha they periodically check for new text files and add their little snippet to them. Can you grab the .css file through FTP and manually examine it?

They don't do anything that sinister, none of the files on the ftp get edited, ever. The ad block is probably just a mandatory header included on all rendered files that get served, and since s9y makes the css look like a php it decides that it needs to tag along too. Whose fault is that? I don't know a lot about the intricacies of CSS but something weird is going on thats causing it to only break the main page sheet, which is why I am thinking it is an easy fix.
smokkinjoe
Posts: 3
Joined: Thu Aug 10, 2006 8:19 pm
Contact:

Post by smokkinjoe »

Jeff,
I see you seem to have fixed the problem on your end, might I ask what the fix was?

I am also have a simular problem, I host the site on my own machine, W2k3 server, I don't have any styling on any of my pages, admin or user.

http://www.zonkz.com/blogs/index.php

Any thoughts?

Thanks,
Joe
jeffmeden
Regular
Posts: 8
Joined: Mon Nov 03, 2003 6:59 am
Location: Columbus, OH

Post by jeffmeden »

smokkinjoe wrote:Jeff,
I see you seem to have fixed the problem on your end, might I ask what the fix was?

I am also have a simular problem, I host the site on my own machine, W2k3 server, I don't have any styling on any of my pages, admin or user.

http://www.zonkz.com/blogs/index.php

Any thoughts?

Thanks,
Joe
Bad news, as mentioned before the fix was to pay for the ad-free hosting account (which is only $4/mo or $36/yr). I have another domain with the same setup, at http://meden.org. I don't know enough about how the style sheets are rendered to say why they might be breaking, i was hoping one of the developers might be able to shed light on that.


Edit: your problem looks different from mine, none of your rewrites are working. maybe your configured paths are incorrect? if you can log in to the admin area (try going to https://zonkz.com/blogs/serendipity_admin.php ) check the paths section for accuracy.
smokkinjoe
Posts: 3
Joined: Thu Aug 10, 2006 8:19 pm
Contact:

Post by smokkinjoe »

I have checked out all the paths, I am going to try doing a clean install on the whole works again, maybe I messed something else up when I was trying to install it, as I was having PHP issues at the time...

Who knows

Thanks,
Joe
jeffmeden
Regular
Posts: 8
Joined: Mon Nov 03, 2003 6:59 am
Location: Columbus, OH

Post by jeffmeden »

joe,
It looks like your URLs are getting rendered without 'index.php?' stuck in there to do rewriting. why that is, i have no idea. Maybe a php version mismatch causing that variable to be dropped?


Anyway, back to my problem with Godaddy. I found this interesting message in the firefox javascript console:

Error: The stylesheet http://meden.org/index.php?/serendipity.css was not loaded because its MIME type, "text/html", is not "text/css".
Source File: http://meden.org/index.php
Line: 0

Now this makes sense, the ad injection causes it to break. No big mystery right? Well when I load the admin page heres what it tells me:

Warning: The stylesheet http://meden.org/index.php?/serendipity_admin.css was loaded as CSS even though its MIME type, "text/html", is not "text/css".
Source File: http://meden.org/serendipity_admin.php
Line: 0

Loaded even though it was wrong? Why play favorites???
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I can't access your page; it's looking for a username/password.

Usually these "no style" problems occur because Serendipity is set up to use "myhost.com" and it's being accessed through "localhost" or "127.0.0.1" or something. That might be the problem with the local server version.

The ad-ruination is obviously something different, though. Why play favorites, indeed? In fact, when I use FireFox's "EditCSS" plugin, it loads as expected and turns your main page theme to one of the contest themes.

But both have the javascript for ads at the bottom. Hmmm....
Judebert
---
Website | Wishlist | PayPal
Post Reply