Opened 17 years ago
Last modified 4 years ago
#2066 new defect
problems with the links
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | high | Component: | MediaWikiPluginMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description
First problem: when a link? is inserted in the mediawiki macro, a page like ...wiki/link/ is linked. That "/" is not needed. (line 956 of parser.py ?)
Second problem: the links are converted to lower case in the slugify_bit function, I don't know about the default on mediawiki, but it make it very hard to link inside de mediawiki macro trac's wiki pages (CamelCase everywhere).
Third problem: The last part of the address is deleted in the links to substitute it with the new link. Example1 . we are in .../wiki/MyPage1 and we link to MyPage2 , we take off MyPage1 and put MyPage2 there. Perfect Example2. We click "wiki" in the navigation bar. We go to .../wiki, we link to MyPage2, we take off wiki and put MyPage2 there. ... Page not found
Attachments (0)
Change History (4)
comment:1 Changed 17 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 17 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
comment:3 Changed 4 years ago by
comment:4 Changed 4 years ago by
Owner: | permon deleted |
---|---|
Status: | reopened → new |
As someone who's been mandated to use MediaWiki in addition to Trac, I find this plugin an interesting academic exercise. I originally added this plugin to our Trac projects a decade or more ago in hopes that it could be used for complex markup that our users would know how to do from their Mediawiki experience. However, this just didn't pan out, and now I realize that apparently a lot of the sophisticated stuff we do with MediaWiki goes way beyond the reaches of this plugin, and doesn't have so much to do with markup syntax but other features of the Mediawiki system itself (of which I'm still mostly blissfully unaware).
On the other hand, our mandate to use our Mediawiki is predicated on the idea that most people would be interested in editing WikiPedia, and would therefore know the syntax. I've learned over the years that WikiPedia is guarded by a rabid herd of "editors" who won't let you change much of anything in any article that proclaims, shall we say, the "mainstream narrative" (and I'm not really even talking about politics, but there are many areas of life where this kind of authority-driven thinking exists). That makes WikiPedia markup syntax moot for the most part, because I can't see most people being interested in editing it. Especially if you get threatened with being banned like I did originally because I didn't realize I was in a "revert war" with the elite corps of "editors" (young adults living in their parents' basements who apparently don't have much else to do with their lives?). ... Although I suppose WikiPedia is useful for truly uncontroversial topics, and to keep up on celebrities and certain current events.
Anyway, I was interested in this ticket and created some modifications that could be of interest to someone with regard to the links. The plugin as it has existed for the last decade is definitely broken with regards to links, since it can only make wiki ("internal") links relative to the current page (sub-pages). I think the links at least need to be relative to the Trac wiki.
In order to get the base href to the Trac wiki, I used
formatter.req.href.base
(I actually add a trailing slash to that) and passed that from theexpand_macro()
call toparse()
and finallyreplaceInternalLinks()
. Enjoy.