Closed Bug 442691 Opened 17 years ago Closed 17 years ago

Template stylesheets aren't absolute links, break on localized kb

Categories

(support.mozilla.org :: Knowledge Base Software, task)

task
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: djst, Assigned: nkoth)

References

()

Details

(Whiteboard: tiki_triage (see comments 4 and 5))

Attachments

(2 files)

This looks like a regression because I didn't see this a couple of days before. Could it be because of the length of the popular article titles? Also where did the Thunderbird background image go?
Setting 0.6 milestone. A possible workaround is to truncate the length of the links.
Target Milestone: --- → 0.6
Seems to have been a temporary thing. Lucy saw it too, but then it went away.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
/me still sees it!
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Tikiwiki bug, refiling. When you go to /en-US/kb, you see the following code: <link type="text/css" href="css/freetags.css" rel="stylesheet"></link> <link type="text/css" href="styles/mozms.css" rel="stylesheet"></link> This tries to go to /en-US/styles/mozms.css, which gives a 404. We need to use the following instead: <link type="text/css" href="/css/freetags.css" rel="stylesheet"></link> <link type="text/css" href="/styles/mozms.css" rel="stylesheet"></link> Does anyone know where this code is? The template makes the following call: {if $headerlib}{$headerlib->output_headers()}{/if} This is also a problem with IE-specific CSS, fixed in r16465.
Assignee: bkrausz → nobody
Severity: normal → major
Status: REOPENED → NEW
Component: General → Knowledge Base Software
QA Contact: stephen.donner → kb-software
Summary: Broken layout of start page → Template stylesheets aren't absolute links, break on localized kb
The code is in lib/headerlib.php (In reply to comment #4) > Tikiwiki bug, refiling. > > When you go to /en-US/kb, you see the following code: > > <link type="text/css" href="css/freetags.css" rel="stylesheet"></link> > <link type="text/css" href="styles/mozms.css" rel="stylesheet"></link> > > This tries to go to /en-US/styles/mozms.css, which gives a 404. We need to use > the following instead: > > <link type="text/css" href="/css/freetags.css" rel="stylesheet"></link> > <link type="text/css" href="/styles/mozms.css" rel="stylesheet"></link> > > Does anyone know where this code is? The template makes the following call: > {if $headerlib}{$headerlib->output_headers()}{/if} > > This is also a problem with IE-specific CSS, fixed in r16465. >
The catch is that "/en-US/kb/" is ok , but "/en-US/kb" is not. Canonicalizing with the trailing slash using a redirect is always a good idea, since it may not just be the css that is affected - not sure what else requires it. My opinion is that since /en-US/kb is a sort of "virtual directory", it should have a trailing slash. However, a redirect is one extra request. Any good ideas? Making lib/headerlib.php use /.... to force it has 2 disadvantages. In principle - tikiwiki is designed to work in sub-directories [multiple tikis on one server for e.g.] (although we've pretty much broken that with our fancy URL handling), and there may be other undiscovered dependencies on /en-US/kb/ being canonicalized as a directory. The other possibility of rewriting /???/{anything} and /??-??/{anything} and /??/{anything} and so on to the webroot could also be too liberal and catch stuff that aren't locales.
Assignee: nobody → nelson
in r16605 (trunk) and r16606 (production)
Comment on attachment 327718 [details] [diff] [review] redirect <locale>/kb and so on to <locale>/kb/ with trailing slash Do we need 0-9 in there as well?
Attachment #327718 - Flags: review?(laura) → review+
no. locales don't have 0-9. Only operating systems.
Do we need to do admin work before this is pushed or should this bug be resolved?
Bulk moving open bugs to 0.6.1
Target Milestone: 0.6 → 0.6.1
Seems to have been fixed, just never closed.
Status: NEW → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Even when I change my preferred language to be Friulian (fur), when I load http://support-stage.mozilla.org/fur/kb it doesn't redirect to http://support-stage.mozilla.org/fur/kb/. Do .htaccess changes not show up until we push live?
.htaccess changes need to be activated by running htaccess.sh in production. This was requested in the push bug - Aravind?
@Laura: Not sure what the Q. here is. There was an explicit request in the last sumo production push bug asking me to run a htaccess script, which I did. I am not sure how other environments are set up.
Laura: was I testing wrong? http://support.mozilla.com/fur/kb does redirect to http://support.mozilla.com/fur/kb/. I assumed that I was supposed to test on support-stage first, but if the script is production-only, then this can be verified FIXED...
This landed in trunk according to the SVN rev # in comment 8, so waiting until I can verify in both places.
Verified FIXED; htaccess.sh was just run on staging, and so I've verified both staging and production redirect me properly; thanks to bkrausz for poking IT :-)
Status: RESOLVED → VERIFIED
Whiteboard: tiki_triage (see comments 4 and 5)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: