Page 1 of 1

Styles listed for a redirected page

Posted: Thu Jul 09, 2009 1:22 am
by MikeGale
I was testing a somewhat odd situation. The style processor didn't do what I expected. I have a site which is mapped to a web server.

I have a page (aspx) with code behind that immediately executes a 301 redirect when the page is loaded.

(The page actually has a style sheet defined, but a browser will not see it.)

I get a listing which says that the style sheets in the redirection target page are missing. Where there is a 301 and different base URL I would expect the checker to say unknown and not list any missing style sheets.

Re: Styles listed for a redirected page

Posted: Thu Jul 09, 2009 7:57 am
by TopStyle Support
Can you send me this document please?

Thanks, Stefan.

Re: Styles listed for a redirected page

Posted: Thu Jul 09, 2009 4:31 pm
by MikeGale
Sent in an email via this site.

Re: Styles listed for a redirected page

Posted: Fri Jul 10, 2009 6:00 am
by TopStyle Support
When I'm running the Style Checker on this page, it tells me "this document contains no style declarations". Can you send me reproducible steps, please?

Thanks, Stefan.

Re: Styles listed for a redirected page

Posted: Fri Jul 10, 2009 6:56 am
by MikeGale
Hi Stefan,

It's an ASP.NET page, UI part and code part. It runs out of a IIS web server with the right features loaded.

The code behind fires on the server when it is "called".

That firing causes the server to emit a 301 redirect to the browser. The browser never sees the page content, it sees the redirect.

I anonymised the page and put in a dummy address, there could be any address in there...

The browser or TopStyle will see:
a) A 301
b) A URI delivered that is different from that called.

A similar thing can be set up on the server, but, from a UA perspective, it would look pretty much the same.

Re: Styles listed for a redirected page

Posted: Sat Jul 11, 2009 3:03 am
by TopStyle Support
Hi Mike,

I understand all this, but how and where are you getting the "listing which says that the style sheets in the redirection target page are missing"?

Feel free to contact me off-forum if you like: support AT topstyle4 DOT COM

Thanks, Stefan.

Re: Styles listed for a redirected page

Posted: Sat Jul 11, 2009 7:56 pm
by MikeGale
Hi Stefan,

Sites > Docs with broken style links

Re: Styles listed for a redirected page

Posted: Mon Jul 13, 2009 9:28 am
by TopStyle Support
Well, even though the page might do a 301 (redirect), it does contain a link to a stylesheet, so it makes sense the Site reports tell you there's a broken link somewhere *if the stylesheet does not exist*. However, if the stylesheet *does* exist, then TopStyle is in error. Please let me know if the latter is the case. Otherwise, I do not think we have a bug here.

Thanks, Stefan.

Re: Styles listed for a redirected page

Posted: Mon Jul 13, 2009 2:58 pm
by MikeGale
No that's not what's happening.

It is listing the style sheets which exist on the page to which it is redirected. (The style sheet listed on the page which does the redirection does exist, but that code path never sees it, because it goes through a mapping to a web server not via the file system.)

So it is saying I see some style sheets on the page that (which I'm redirected to), it then concludes that these sheets don't exist on the local web site.

(I'm not inclined to add some baggage of remote site style sheets to shut down this message. If I did these sheets would have no real purpose on the local site, other than to stop that message.)