#3730 closed task (fixed)
Remove "- Trac" suffix from the HTML head title
Reported by: | Owned by: | Remy Blank | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11.2 |
Component: | general | Version: | |
Severity: | major | Keywords: | |
Cc: | coderanger@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Every page generated by trac contains "- Trac" at the end of the html title (hard-coded in header.cs).
Trac is not the central part of a project (and thus of the projects documents). The project is the central part, thus the project name should be the last part in the titles.
This woul would increase additionally the quality of search-engine results which subject trac itself (i'm hitting permanently on non-relevant stuff due to the "Trac" in the headers.
This is true for the trac.edgewall.org site, too. I'm currently on the page
New Ticket - The Trac Project - Trac
Attachments (0)
Change History (40)
comment:1 by , 18 years ago
Milestone: | 0.10 |
---|
follow-up: 3 comment:2 by , 18 years ago
Milestone: | → 0.10 |
---|
I think it is.
Please do not change a milestone as "anonymous".
follow-up: 4 comment:3 by , 18 years ago
Milestone: | 0.10 |
---|
Replying to ilias@lazaridis.com:
I think it is.
Please do not change a milestone as "anonymous".
I agree with anonymous. Ilias, please don't set 0.10 for new tickets. One of the developers will change the milestone if we feel like it's important, but we need to get 0.10 wrapped up.
comment:4 by , 18 years ago
Milestone: | → 0.10.1 |
---|---|
Summary: | Please verify removing "- Trac" from HTML head → "- Trac" Suffix does not belong into the HTML head |
Type: | task → defect |
Replying to mgood:
Replying to ilias@lazaridis.com:
I think it is.
Please do not change a milestone as "anonymous".
I agree with anonymous.
possibly. but in context 'workflow', an anonymous should not touch the milestone.
Ilias, please don't set 0.10 for new tickets.
ok - see #3734
One of the developers will change the milestone if we feel like it's important,
I've changed the ticket, as it's basicly it's a defect.
but we need to get 0.10 wrapped up.
Solving this ticket is non-intrusive.
As for getting 0.10 out, I'm interested in this, too.
Is there any "help for 0.10 needed" document?
follow-up: 6 comment:5 by , 18 years ago
This is trivial to override yourself, just edit the template, or if you want to avoid that, copy header.cs to the env's templates folder, and edit it there.
comment:6 by , 18 years ago
Replying to coderanger@yahoo.com:
This is trivial to override yourself, just edit the template, or if you want to avoid that, copy header.cs to the env's templates folder, and edit it there.
yes, of course. But I'm intrested in getting the relevant modifications into the original sources of trac.
follow-up: 9 comment:8 by , 18 years ago
what happens if the project is renamed? what happens if the project name contains a characters not allowed as a part of the file name?
comment:9 by , 18 years ago
Cc: | added |
---|
Replying to moisei:
what happens if the project is renamed? what happens if the project name contains a characters not allowed as a part of the file name?
I'm not sure I see the relavance of this. I don't think there is much risk of Trac being renamed in the near future.
comment:10 by , 18 years ago
Replying to Noah Kantrowitz (coderanger) <coderanger@yahoo.com>:
Why?
please, I don't like to discuss essentials of Open Source Collaboration within a ticket system.
I've given the arguments subjecting this ticket, the team can decide now. (to me it's not critical, as I've now a flexible mechanism to alter the templates).
comment:11 by , 18 years ago
Summary: | "- Trac" Suffix does not belong into the HTML head → "- Trac" Suffix does not belong into the HTML head title |
---|
changing title
comment:12 by , 18 years ago
Summary: | "- Trac" Suffix does not belong into the HTML head title → Remove "- Trac" suffix from the HTML head title |
---|
-1 on this. It's easy enough to hack the template if this is important to you. I don't mind it on our sites at all, especially if it drives more people to check out this project.
comment:14 by , 18 years ago
Milestone: | 0.10.3 → 0.11 |
---|
defect verification:
visit a project which uses trac (and the original templates)
visit a project which uses modified templates (without the "- Trac" suffix)
Print out a document from both sites.
Then ask yourself honestly:
what does "Trac" has to do on the title of the document.
follow-up: 16 comment:15 by , 18 years ago
Alternate solution:
Use this JavaScript snippet.
$(function() {document.title = document.title.substr(0, document.title.length-7)});
Enjoy.
comment:16 by , 18 years ago
Replying to anonymous:
Alternate solution:
Use this JavaScript snippet.
$(function() {document.title = document.title.substr(0, document.title.length-7)});Enjoy.
This ticket is not about workarounds, but about removing the defect within the trac code base.
comment:17 by , 18 years ago
Priority: | normal → high |
---|
defect verification:
- visit a project which uses trac (and the original templates)
- Print out a document
- Ask yourself honestly:
- what does "Trac" has to do on the title of the document?
comment:18 by , 18 years ago
Can this ticket be closed yet? The original reporter seems to have dropped their argument, which didn't make a lot of sense to begin with.
comment:19 by , 18 years ago
Milestone: | 0.11 |
---|---|
Priority: | high → normal |
Resolution: | → wontfix |
Status: | new → closed |
Yeah, I agree that this seems fine as-is.
comment:22 by , 16 years ago
Component: | general → attachment |
---|---|
Milestone: | → not applicable |
Resolution: | wontfix |
Severity: | normal → blocker |
Status: | closed → reopened |
Type: | defect → task |
Version: | devel |
follow-up: 25 comment:24 by , 16 years ago
Component: | attachment → general |
---|
The reasons outlined in the duplicates of this issue are pretty clear: having the title pollutes search engine indexes, makes searching for Trac-related stuff harder, and adds unnecessary branding to projects running a Trac instance.
So, a +1 from me to remove the '- Trac' suffix from the page titles. Please, please, pretty please?
(Note that upcoming Debian packages patch this suffix out by default, fwiw.)
comment:25 by , 16 years ago
Replying to WouterBolsterlee:
So, a +1 from me to remove the '- Trac' suffix from the page titles. Please, please, pretty please?
I agree: +1 to remove them
comment:28 by , 16 years ago
FWIW, I'd be +1 on this as well. I've been bitten several times by "Google poisoning" due to this issue.
comment:29 by , 16 years ago
Milestone: | → 0.11.2 |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
Fixed in [7536].
follow-up: 31 comment:30 by , 16 years ago
FWIW, I'm glad to see this fixed, it is annoying that any time I want to search about how to do something with Trac and I include "trac" in my search results that I basically get a nice list of everyone with a public Trac environment, and no results on "building trac plugin," which can bring up a page about Pidgin plugins. I'm surprised that there was resistance to this because I would think that not having Trac in the page title would help prevent users from believing that there is an association between Edgewall Trac and a project:
New ticket says:
Also, if you have an issue with some other software (Pidgin, MacPorts, VirtualBox, etc.) for which the development is managed using Trac, be careful to create a ticket on their instance of Trac, not here (which is the Trac for Trac itself).
comment:31 by , 16 years ago
Replying to Jason Winnebeck <jpwasp@…>:
I'm surprised that there was resistance to this
That's mostly because of the person (me) which filed the ticket, and some developers which played "Design by Egoism". Sad thing that users suffer from this kind of games.
comment:32 by , 16 years ago
Owner: | changed from | to
---|
follow-up: 35 comment:33 by , 16 years ago
I'm a new reader of this topic. I absolutely want this suffix removed.
I tried to remove it on a site that uses trac, but it wasn't easy to find out the solution or even find this ticket with google, because of the numerous irrelevant pages that can be found if I write something like: "site title trac". This is mainly because of these suffixes in page titles.
comment:35 by , 16 years ago
Replying to anonymous:
I'm a new reader of this topic. I absolutely want this suffix removed.
(..)
It is removed, in version 11.2. If you work with another version, just edit the main template (/path/to/env/templates/layout.html if I remember right).
follow-up: 37 comment:36 by , 12 years ago
+1 from me, it looks stupid on search engine. We use Trac for content management. You don't want "Joomla" in every title ether. This is advertizement for Trac, not needed in the title. Also, it possibly attracts Trac spammers. Have been fighting against Trac spammers for ages. I think they use that to find susceptible sites more easily.
-Gunther Schadow
follow-up: 38 comment:37 by , 12 years ago
Replying to anonymous:
+1 from me, it looks stupid on search engine. We use Trac for content management. You don't want "Joomla" in every title ether. This is advertizement for Trac, not needed in the title. Also, it possibly attracts Trac spammers. Have been fighting against Trac spammers for ages. I think they use that to find susceptible sites more easily.
Alright, I checked that ticket was still open, but apparently it has been addressed in 11. So now to find how to edit this template…
Step 1: find your Trac installation inside your python installation
Step 2: cd site-packages/Trac*.egg/templates/
Step 3: edit header.cs, search for "- Trac", remove that
If in doubt, use find / -name 'Trac*' and grep — "- Trac".
-Gunther Schadow
follow-up: 39 comment:38 by , 12 years ago
Replying to anonymous:
Replying to anonymous: Alright, I checked that ticket was still open, but apparently it has been addressed in 11. So now to find how to edit this template…
Step 1 - 2 -3
Yeah right, it doesn't do anything when I edit the header.cs file. The stupid thing keeps coming up. I am sure this is a no-brainer for those who hack trac all the time. But not for those who just use it. :(
Shut down apache and restarted to ensure we are not caching something here. Turned off caching still same. Pulling my hair out doesn't help either.
Brute force attempt:
fgrep -Rl -- '- Trac' / 2>/dev/null
comment:39 by , 12 years ago
Replying to anonymous:
Replying to anonymous:
Replying to anonymous:
Brute force attempt:
fgrep -Rl -- '- Trac' / 2>/dev/null
It's all useless! Someone up here mentioned layout.html, without certainty. The header.cs and other mentions of .cs files chased me down a rathole. Grep would have never picked this up. I searched for '</title>' and found it in many files, including the layout.html file.
python*/site-packages/Trac-0.11.1-*.egg/trac/templates/layout.html
<title py:with="title = list(select('title/text()'))"> <py:if test="title">${title} â\200\223</py:if> ${' â\200\223 '.join(filter(None, [project.name, 'Trac']))} </title>
no idea what that â\200\223
gibberish is, but using my time-tested motto: "when in doubt ignore / remove it" and then, making the minimal tweak (me knowing gazillion languages, but never cared about python — which I am sure makes me an inferior being in the eyes of a trac hacker, but I don't care, …) — I got this:
<title py:with="title = list(select('title/text()'))"> <py:if test="title">${title}</py:if> ${' '.join(filter(None, [project.name]))} </title>
and after restarting apache, this fixed it.
Uff.
Hope it helped others. -Gunther
PS: Yeah, why don't I upgrade? Because I don't want to deal with the risk of the update failing and me spending the next day or two fixing a million other things.
comment:40 by , 12 years ago
Oh man, now it has happened just as I wanted to avoid it! The AccountManager stuff does not work in 0.11.2 version that I have, and to get Trac-1.0 upgrade I need to upgrade python, CentOS doesn't do upgrade of python to 2.6 as required by Trac, and when I manually do it I need to also upgrade mod_python and mod_python doesn't even begin to compile on CentOS. And I thought these problems only occur with FreeBSD, but no. I have no time for this crap. Why all these dependencies on stuff that constantly changes? #!@% grrrr.
comment:41 by , 12 years ago
OK, it's kind of ridiculous. I figure people would call me crazy trying to use a 4 year old Trac version and complain. But I just recovered from a f'ed up upgrade attempt to Trac 1.0 (python dependency does not resolve on CentOS …) then tracked back to 0.12 and after updating all the … dependencies it just still the account manager wouldn't work. There is even a ticket on that its not working in 0.12. So I rolled all the way back from where I started and and now it's working for me.
My instinct was right, don't stir in a rats nest. I'm glad I just wasted 12 hours over this stuff and not a half day :(.
-Gunther
This is not urgent for 0.10.