Edgewall Software
Modify

Opened 18 years ago

Last modified 9 years ago

#4160 new defect

Broken InterWiki Link

Reported by: jeff.wise@… Owned by:
Priority: normal Milestone: next-major-releases
Component: version control/log view Version: 0.10
Severity: normal Keywords: interwiki intertrac
Cc: ivo.sieben@…, xurizaemon@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The following InterWiki link behaves strangely:

Syntax Behavior
[tps-t6:1234567] Displays as-is, not hyperlinked.
[tps-t6:1234567 test] Displays test hyperlinked to a working URL.
tps-t6:1234567 Displays tps-t6:1234567 hyperlinked to a working URL.

If I change the InterWiki link to tps instead of tps-t6, all of the above syntaxes generate a hyperlink to a working URL as expected.

Attachments (0)

Change History (20)

comment:1 by Christian Boos, 18 years ago

Seems to work here:

----
trac-dev:135
[trac-dev:135]
[trac-dev:135 Workflow: ...]
----

trac-dev:135 135 Workflow: ...


Can you try to upgrade to 0.10.2?

comment:2 by jeff.wise@…, 18 years ago

Before I take the upgrade route, your links above work for me as well when I cut and paste them into a wiki. I had already tried trac-dev thinking it was a dash issue. I think the problem may lie in the number before the colon. The dash may or may not be a factor.

comment:3 by Tim Hatch <trac@…>, 18 years ago

I can confirm this is an issue with the latest trunk. It's being caught by the log formatter regexp at source:trunk/trac/versioncontrol/web_ui/log.py@4282#L238.

comment:4 by Christian Boos, 18 years ago

Ah, right!

[tps-t6:1234567]
[------:-------]   - revision range
 tps-t             - intertrac prefix
      6 1234567    - the two revisions

requiring a space would break existing stuff like: [G100:110]

Well, I'll sleep over it ;)

comment:5 by Tim Hatch <trac@…>, 18 years ago

Would it be too hackish for the log formatter to be able to pass on it, after finding an invalid intertrac prefix, and construct an interwiki link instead? Are there other places that could have the same problem, or is it just this one?

comment:6 by Tim Hatch <trac@…>, 18 years ago

Ooh, or better yet, look up valid intertrac/interwiki prefixes and adjust the INTERTRAC_SCHEME regexp to be an alternation of them?

comment:7 by Tim Hatch <trac@…>, 18 years ago

Just a note, [tps-t6: 1234567] with a space after the colon works for interwiki.

in reply to:  7 comment:8 by anonymous, 18 years ago

Replying to Tim Hatch <trac@timhatch.com>:

Just a note, [tps-t6: 1234567] with a space after the colon works for interwiki.


[tps-t6: 1234567] doesn't complete the URL. In this scenario, 1234567 is just a label for the URL tps-t6 points to with an empty argument.

comment:9 by Christian Boos, 18 years ago

One workaround I can suggest for now is to make use of the multiple arguments facility:

tps-ts6 http://tps-system6/object-id/$1$2  # Link to $1$2 in tps6

Then, tps-ts6:123456 as well as [tps-ts6::123456] should work… (not tested though)

in reply to:  9 comment:10 by jeff.wise@…, 18 years ago

Replying to cboos:

One workaround I can suggest for now is to make use of the multiple arguments facility:

tps-ts6 http://tps-system6/object-id/$1$2 # Link to $1$2 in tps6

Then, tps-ts6:123456 as well as [tps-ts6::123456] should work… (not tested though)


I tested it against 0.10.

Syntax Display URL
[tps-t6::1234567] :1234567 Y
[tps-t6:1234567] [tps-t6:1234567] N
[tps-t6:1234567:] 1234567: Y
[tps-t6:1234:567] 1234:567 Y

comment:11 by Christian Boos, 18 years ago

Keywords: interwiki intertrac added
Milestone: 0.11
Owner: changed from Jonas Borgström to Christian Boos

Well, so that works except for the extraneous ":" displayed, which is of course a bit annoying.

The suggestion of Tim would work (alter INTERTRAC_SCHEME) and is probably the best thing to do, but it looks a bit complex to implement, like the need rebuild the wiki rules when the config changes. It's probably what I'll end up doing if I get no better idea in between ;)

comment:12 by Christian Boos, 18 years ago

#5324 was closed as duplicate (it was talking about intertrac links, but it's the same issue).

There, the suggestion was made to use ":" as a separator for the shorthand links as well. That would work well for tickets and reports, but not for changesets for the reasons explained in comment:4.

We can probably make a special case there: in [ET64:100] either consider it's r100 in project ET64 if that intertrac/interwiki link exists, otherwise revert to the usual interpretation as [64:100] in project ET.

comment:13 by anonymous, 18 years ago

Cc: ivo.sieben@… added

comment:14 by xurizaemon, 17 years ago

Cc: xurizaemon@… added

We're seeing similar issues, where a prefix (gwiki:) works sometimes and doesn't get linked other times. We're on Trac 10.4 (ubuntu Feisty packages). Is there a way of defining the order in which each Wiki parser gets run on the content? Am I barking up the wrong tree?

in reply to:  14 ; comment:15 by Christian Boos, 17 years ago

Replying to xurizaemon:

We're seeing similar issues, where a prefix (gwiki:) works sometimes and doesn't get linked other times. … Am I barking up the wrong tree?

As gwiki: is not a problematic prefix as discussed here, I believe your problem is rather due to the change notification issue, see TracDev/Proposals/Journaling#ReactingonWikicontentchange

After a while, all the server processes are aware of the new content of InterMapTxt. This is a separate issue which is going to be addressed in milestone:0.12.

in reply to:  15 ; comment:16 by anonymous, 17 years ago

Replying to cboos:

As gwiki: is not a problematic prefix as discussed here, I believe your problem is rather due to the change notification issue, see TracDev/Proposals/Journaling#ReactingonWikicontentchange

I'll try an apache2ctl restart and see if that makes it behave. Thanks for the info.

Do "problematic prefixes" refer only to /[a-z-]+[0-9]+:/ as above? I did wonder at first if using a legitimate WikiWord as a prefix was causing the Wiki entry to hijack the InterTrac reference, because I'd used GreenWiki before gwiki, and it sometimes linked instead to that Wiki page (which I'd created AFTER updating InterMapTxt).

in reply to:  16 comment:17 by Christian Boos, 17 years ago

Replying to anonymous:

Do "problematic prefixes" refer only to /[a-z-]+[0-9]+:/ as above?

Yes

I did wonder at first if using a legitimate WikiWord as a prefix was causing the Wiki entry to hijack the InterTrac reference, because I'd used GreenWiki before gwiki, and it sometimes linked instead to that Wiki page (which I'd created AFTER updating InterMapTxt).

Same explanation for the "sometimes" than for the "gwiki:" case.

comment:18 by Christian Boos, 14 years ago

Component: wiki systemversion control/log view

The LogModule should simply try to be a bit more robust here.

comment:19 by Christian Boos, 14 years ago

Milestone: next-minor-0.12.xnext-major-0.1X

Not for 0.12.x.

comment:20 by Ryan J Ollos, 9 years ago

Owner: Christian Boos removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


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