Ticket #976 (new enhancement)
Opened 7 years ago
Last modified 14 months ago
Wiki Page redirects to other Wiki pages and possibly other Trac resources
| Reported by: | cboos@… | Owned by: | cboos |
|---|---|---|---|
| Priority: | lowest | Milestone: | next-major-0.1X |
| Component: | wiki system | Version: | 0.11.2 |
| Severity: | minor | Keywords: | page alias, redirect |
| Cc: | bfults+trac@…, kasper.souren+trac@…, felix.schwarz@…, yoav@… | ||
| Release Notes: | |||
| API Changes: | |||
Description (last modified by cboos) (diff)
There should be a way to redirect from a wiki page to another Wiki page. A [[Redirect(target)]] macro could do that.
The target could actually be any Trac resource, if specified by a TracLink.
That could be handy in several situations:
- singular/plural form of WikiPageNames: TracLink redirecting to TracLinks
- direct alias to a source file: ChangeLog redirecting to source:/trunk/ChangeLog
- direct alias to a ticket: TooManyDatabaseLocks? redirecting to #3446
It could be useful to implement this in Trac core instead of a plugin so that one provide a generic way to detect that one was redirected, and eventually provide a Edit button that would
trigger the edition of the originally requested page (the one
containing the [[Redirect]] macro or the #redirect directive,
or whatever is chosen to implement it...)
Attachments
Change History
comment:1 Changed 7 years ago by vittorio
- Severity changed from normal to enhancement
comment:2 Changed 7 years ago by utopiste
- Resolution set to wontfix
- Status changed from new to closed
comment:3 Changed 7 years ago by anonymous
Not to argue in favor of textual aliases, but... it is really posible to put JavaScript code in a #!html markup block? I though script was among the forbidden tags in such blocks.
comment:4 Changed 7 years ago by haui at haumacher.de
- Keywords page alias, redirect added; aliases removed
- Resolution wontfix deleted
- Status changed from closed to reopened
The workaround suggested by "utopiste" is well... simply wrong. Embedding script into wiki pages is disallowed (which is not a bug, but a feature). But having alias names for pages would be really useful, not only for the purpose mentioned in this ticket. Another solution would be to have a redirect macro (like in Wikipedia). But anyway, there must be some support to be able to edit redirecting pages (something like a do-not-redirect argument).
The following error message is printed, if you try to embedd script code into your page:
Error: HTML block contains disallowed tags. <script> document.location="where-ever"; </script>
comment:5 Changed 7 years ago by haui at haumacher.de
- Summary changed from [ER] Textual aliases for Tickets (and for any other Trac object) to Page redirects and textual aliases for Tickets (and other Trac objects)
comment:6 Changed 7 years ago by haui at haumacher.de
Here is a (partial) solution. Use the redirect macro from:
http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/redirect.py
Further descriton can be found at the MacroBazaar. Editing redirecting pages is somewhat hacky.
comment:7 Changed 6 years ago by anonymous
Sorry to say that, but the redirect macro doesn't seem to work w/ 0.9 (at least not w/ beta2).
comment:8 Changed 6 years ago by moschny at ipd dot uni-karlsruhe dot de
There is an updated version available on our website that should work with 0.9b2.
See http://svn.ipd.uni-karlsruhe.de/trac/javaparty/wiki/TracRedirect .
comment:9 Changed 6 years ago by athomas
Addressing only the textual aliases part of this, wouldn't this be achievable with a custom alias text field? Perhaps group? This would let you group all related tickets using a query.
comment:10 Changed 6 years ago by cboos
- Owner changed from jonas to cboos
- Status changed from reopened to new
Grouping tickets is something I currently do using the keywords field,
e.g workflow tickets.
There are other ideas that have been discussed for achieving this:
- Master tickets (#886)
- Relations/tags (cf. TracCrossReferences).
An alias text field could actually be used for creating an <<alias>> relation to a wiki page.
comment:11 Changed 5 years ago by cboos
- Description modified (diff)
- Summary changed from Page redirects and textual aliases for Tickets (and other Trac objects) to Wiki Page redirects to other Wiki pages and possibly other Trac resources
#3604 was marked as duplicate of this one. Also the description has been rewritten to reflect my current ideas about this feature.
comment:12 Changed 5 years ago by cboos
- Milestone set to 1.0
Eventually one day... MoinMoin has this feature for example. Also, this would provide a cheap way to "fix the links" after a WikiRename ;)
comment:13 Changed 5 years ago by bfults+trac@…
- Cc bfults+trac@… added
MediaWiki accomplishes both the redirect feature and ability to edit a redirect pretty cleanly. This would be a huge help in Trac.
comment:14 follow-up: ↓ 15 Changed 4 years ago by anonymous
- Cc kasper.souren+trac@… added
I would really love to have this feature in the standard release. MediaWiki style. It's almost pushing me into Trac hacking.
comment:15 in reply to: ↑ 14 Changed 3 years ago by TomDesp
- Version changed from 0.8 to 0.11.2
Replying to anonymous:
I would really love to have this feature in the standard release. MediaWiki style. It's almost pushing me into Trac hacking.
Pretty much the same for me. A-la MediaWiki redirections (that is aliases) is a must have in wiki platforms. It makes content more consistent, readable and easy to maintain.
comment:16 Changed 3 years ago by TomDesp
Another point: redirection has to be handled server side, not client side, to keep track of redirected backlinks. Also not to be javascript enabling dependent...
comment:17 Changed 2 years ago by Felix Schwarz <felix.schwarz@…>
- Cc felix.schwarz@… added
comment:18 Changed 2 years ago by yoav@…
- Cc yoav@… added
I want MediaWiki style redirects. This feature is really missing for me too.
comment:19 Changed 22 months ago by cboos
- Milestone changed from 1.0 to unscheduled
Milestone 1.0 deleted
comment:20 Changed 21 months ago by cboos
- Milestone changed from triaging to next-major-0.1X
- Priority changed from normal to lowest
- Severity changed from normal to minor
comment:21 follow-up: ↓ 22 Changed 21 months ago by Martin Scharrer <martin@…>
The plugins TracRedirect and
ServerSideRedirectPlugin provide this functionality.
The syntax [[Redirect(realm:id)]] is supported by the
ServerSideRedirectPlugin.
comment:22 in reply to: ↑ 21 Changed 14 months ago by shoffmann
Replying to Martin Scharrer <martin@…>:
The plugins TracRedirect and
ServerSideRedirectPlugin provide this functionality.
The syntax [[Redirect(realm:id)]] is supported by the ServerSideRedirectPlugin.
ServerSideRedirectPlugin includes TracRedirect functionality in a smart way, is very fast and all-in-all the best solution for redirections in Trac. +1 from me to make it a Trac standard macro.



This idea is well... a bad idea. It's a big hack solution for a not real problem.
The easy way for worked with a lot of ticket that i use is :
If you want realy have wiki page that redirect you add yourself a #html markup block and create some javacript that redirect you to the good page.