Closed Bug 1008100 Opened 11 years ago Closed 10 years ago

Port 404 page to Bedrock

Categories

(www.mozilla.org :: Pages & Content, defect)

Production
x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: pascalc, Unassigned)

References

Details

(Whiteboard: [kb=1370574] )

Attachments

(1 file)

THe 404 page is still on PHP, porting that would allow me to delete it for all locales and also have a working 404 page, our localized versions are more outdated than the en-US one. Given that 404 is often a special page, I don't know if this requires special work on the php and python codebases.
As we discussed on IRC, there is a bedrock 404 page, but you only get it if the incorrect URL passes through to bedrock via the apache config. For example, all urls after /foundation/* are passed to bedrock, so http://www.mozilla.org/en-US/foundation/foobar/ is a bedrock 404. Now whether we can point 404s on the PHP side to the bedrock 404 is another matter. It might be possible via some apache configuration. We can use this bug to give it a shot.
The 404 document in the Apache config (in .htaccess on the mozilla.com repo) is "/includes/prefetch.php" which according to the comment in the Apache config: > # If someone tries to go to an old-style URL (eg. http://www.mozilla.com/de/firefox/help) > # this handler will pick it up, detect the language, and if it's a "valid" page > # (despite the 404) it'll still forward them to the correct place. If it's not a > # valid page, they'll get a localized 404 (if available) > ErrorDocument 403 /includes/prefetch.php > ErrorDocument 404 /includes/prefetch.php So we may have to port some forwarding logic to a view on bedrock at which can point these "ErrorDocument" directives.
Would it be possible to test that on a demo server? many of the smaller locales now only have a 404 page on the php site, sometimes not even translated. If we can use the bedrock 404 instead, we could delete those locales on svn.
Adding to mozilla.org Kanban board. Pmac: How much work would it be to test this? Thx.
Whiteboard: [kb=1370574]
Could we look at that for q3? As you can see, many locales still have a folder on svn just to be able to serve a 404 page and for those this is the last tie to the PHP framework: http://viewvc.svn.mozilla.org/vc/projects/mozilla.com/tags/production/eo/
I'll see what I can do. The 404 mechanism is sortof built into the system that merges the .org and the .com codebases. It intercepts 404s, and looks for the file in the other location. I'm not sure it's worth the risk of breaking that to do this. If these dangling 404 pages are the last to go it would be a very easy deletion.
Thanks for looking into it, pmac.
FYI: We get roughly 10k 404s per day on mozilla.org and a majority of them are to the legacy php 404 page. My main concern with the 404 page is not php vs python, it is that the old 404 page has the outdated navigation and branding. I would be fine with the same php code if it used the same template as bedrock, but then we would be maintaining sandstone base templates.
Blocks: 1120820
Let's discuss this one again tomorrow in our weekly team meeting. What is the LOE of what Pmac proposes in comments 2 and 6? Vs what Cmore suggests in comment 8? We are close to closing out the .com svn repo, but a little less close to the .org repo.
Steven or Craig will update the old 404 page to match the new one by the end of Q1. Thx.
Well, maybe we are ready to delete this after all?
It's definitely still in use. Until we can flip the site (default stuff to bedrock, and only specific URLs to PHP) we do still need this.
(In reply to Paul McLanahan [:pmac] from comment #13) > It's definitely still in use. Until we can flip the site (default stuff to > bedrock, and only specific URLs to PHP) we do still need this. Makes sense. I just got a little over-excited. Steven - Can you pick this (comment 11) up for April?
Flags: needinfo?(steven)
(In reply to Jennifer Bertsch [:jbertsch] from comment #14) > (In reply to Paul McLanahan [:pmac] from comment #13) > > It's definitely still in use. Until we can flip the site (default stuff to > > bedrock, and only specific URLs to PHP) we do still need this. > > Makes sense. I just got a little over-excited. > > Steven - Can you pick this (comment 11) up for April? Sure, I can take this. Just to make sure, I'll be updating the dark-background old PHP 404 page (https://www.mozilla.org/en-US/asdf) to look like the beige-background bedrock 404 (https://www.mozilla.org/b/en-US/asdf), correct?
Flags: needinfo?(steven)
Will be working on this one. Just to clarify can I get sgarrity's question confirmed. Just to make sure, I'll be updating the dark-background old PHP 404 page (https://www.mozilla.org/en-US/asdf) to look like the beige-background bedrock 404 (https://www.mozilla.org/b/en-US/asdf), correct?
Malena, I wonder if we should also replace the download button with a plain "Get Firefox" link to the /firefox/new/ page, so we can drop any leftover messy PHP download button code.
(In reply to Steven Garrity [:sgarrity] from comment #17) > Malena, I wonder if we should also replace the download button with a plain > "Get Firefox" link to the /firefox/new/ page, so we can drop any leftover > messy PHP download button code. That sounds like a great idea Steven.
We're close to shutting down the PHP site. I would propose we leave these 404 html files where they are until that shutdown happens. Then, once the PHP site isn't being served on mozilla.org anymore, any 404s will be caught by the bedrock 404 page and these .html files can fester in the digital ether forever more. pmac, sound ok?
Flags: needinfo?(pmac)
[thumbs up]
Flags: needinfo?(pmac)
The translation of this page is in the pipeline
Commits pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/275a416ca2912d37099ff546561c828340a4d08c Bug 1008100: fix typo in 404 template Re-using existing bug for reference. The old PHP template has a slightly different text, “here” came after a comma, so I guess blind copy and paste. https://www.mozilla.org/en-US/404 https://github.com/mozilla/bedrock/commit/b1d26e98e46dd5b55c86d5a073a68aea201664cf Merge pull request #3320 from flodolo/bug1008100 Bug 1008100: fix typo in 404 template
FYI, we have the page in 36 locales now: https://l10n.mozilla-community.org/~pascalc/langchecker/?locale=all&website=0&file=mozorg/404.lang I'd prefer to have more locales before a switch to the Bedrock version though, probably like 50.
Excellent news Pascal! Hopefully we'll be ready for the switch soon as well. Thanks for keeping the bug updated.
Blocks: 1038306
Update from Pascal on IRC today: > <pascalc> 42 locales done > <pascalc> we could switch to the new 404 by default I think
59 locales done now.
Blocks: 1186102
This is the last remaining page on SVN.
And as of last week (bug 1252014) we're no longer using our legacy deployment (servers in scl3) for production traffic, and the new AWS deployments do not include the PHP side at all. So I believe this bug is now fixed by default.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Confirmed, I finally see the updated text https://www.mozilla.org/it/blablabla
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: