Edgewall Software
Modify

Opened 18 years ago

Closed 16 years ago

Last modified 12 years ago

#3730 closed task (fixed)

Remove "- Trac" suffix from the HTML head title

Reported by: ilias@… 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 anonymous, 18 years ago

Milestone: 0.10

This is not urgent for 0.10.

comment:2 by ilias@…, 18 years ago

Milestone: 0.10

I think it is.

Please do not change a milestone as "anonymous".

in reply to:  2 ; comment:3 by Matthew Good, 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.

in reply to:  3 comment:4 by ilias@…, 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: taskdefect

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?

comment:5 by coderanger@…, 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.

in reply to:  5 comment:6 by ilias@…, 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.

comment:7 by Noah Kantrowitz (coderanger) <coderanger@…>, 18 years ago

Why?

comment:8 by moisei, 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?

in reply to:  8 comment:9 by Noah Kantrowitz (coderanger) <coderanger@…>, 18 years ago

Cc: coderanger@… 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.

in reply to:  7 comment:10 by ilias@…, 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 ilias@…, 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 sid, 18 years ago

Summary: "- Trac" Suffix does not belong into the HTML head titleRemove "- 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:13 by omry, 18 years ago

So, will this be addressed?

comment:14 by ilias@…, 18 years ago

Milestone: 0.10.30.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.

comment:15 by anonymous, 18 years ago

Alternate solution:

Use this JavaScript snippet.

$(function() {document.title = document.title.substr(0, document.title.length-7)});

Enjoy.

in reply to:  15 comment:16 by ilias@…, 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 ilias@…, 18 years ago

Priority: normalhigh

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 hyuga <hyugaricdeau@…>, 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 Matthew Good, 18 years ago

Milestone: 0.11
Priority: highnormal
Resolution: wontfix
Status: newclosed

Yeah, I agree that this seems fine as-is.

comment:21 by ilias@…, 17 years ago

similar #6628

comment:22 by anonymous, 16 years ago

Component: generalattachment
Milestone: not applicable
Resolution: wontfix
Severity: normalblocker
Status: closedreopened
Type: defecttask
Version: devel

comment:23 by Sam Hocevar, 16 years ago

#7162 is similar, too.

comment:24 by WouterBolsterlee, 16 years ago

Component: attachmentgeneral

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.)

in reply to:  24 comment:25 by Emmanuel Blot, 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:26 by ilias@…, 16 years ago

Milestone: not applicable
Severity: blockermajor

Any action here?

comment:27 by anonymous, 16 years ago

+1

comment:28 by Remy Blank, 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 Remy Blank, 16 years ago

Milestone: 0.11.2
Resolution: fixed
Status: reopenedclosed

Fixed in [7536].

comment:30 by Jason Winnebeck <jpwasp@…>, 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).

in reply to:  30 comment:31 by ilias@…, 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.

http://case.lazaridis.com/wiki/TracAudit

comment:32 by Christian Boos, 16 years ago

Owner: changed from Jonas Borgström to Remy Blank

comment:33 by anonymous, 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:34 by Remy Blank, 16 years ago

See comment:29. But we can't force people to upgrade to ≥ 0.11.2…

in reply to:  33 comment:35 by ilias@…, 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).

comment:36 by anonymous, 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

in reply to:  36 ; comment:37 by anonymous, 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

in reply to:  37 ; comment:38 by anonymous, 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

in reply to:  38 comment:39 by anonymous, 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 anonymous, 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 anonymous, 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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.