Last modified: 2010-05-15 15:38:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 2084 - incorrectly typed redirect(s) and Special:Whatlinkshere
incorrectly typed redirect(s) and Special:Whatlinkshere
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Redirects (Other open bugs)
1.5.x
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://jadesukka.homelinux.org:8180/m...
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-06 02:45 UTC by lɛʁi לערי ריינהארט
Modified: 2010-05-15 15:38 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
regex fix (556 bytes, patch)
2008-03-14 21:28 UTC, Nicolas Dumazet
Details
regex fix (typo) (554 bytes, patch)
2008-03-14 21:44 UTC, Nicolas Dumazet
Details

Description lɛʁi לערי ריינהארט 2005-05-06 02:45:45 UTC
Halló!

a) generate [[foo REDIRECT]] with some content
b) generate [[bar REDIRECT]] withe the following content

#REDIRECT [[foo REDIRECT]
one closing braket only; this generates a functional redirect see
http://jadesukka.homelinux.org:8180/mediawiki15c/index.php?title=Bar_REDIRECT&redirect=no

But it will NOT show up in
http://jadesukka.homelinux.org:8180/mediawiki15c/index.php?title=Toiminnot:Whatlinkshere&target=Foo_REDIRECT

Regards Reinhardt
Comment 1 Ævar Arnfjörð Bjarmason 2005-05-06 03:25:48 UTC
Fixed in REL1_4 and HEAd, it was an invalid regular expression in
includes/Title.php that accepted redirects with the syntax #REDIRECT [[foo], the
old regular expression was \\[\\[([^\\]\\|]+)[\\]\\|] and the new one is
\[{2}(.*?)(?:\||\]{2})
Comment 2 Rowan Collins [IMSoP] 2005-05-07 14:00:45 UTC
(In reply to comment #1)
> \[{2}(.*?)(?:\||\]{2})

Won't that match unclosed piped links like "#redirect [[foo|" and "#redirect
[[foo|bar"?
I think what you want is:
\[{2}(.*?)(?:\|.*?)?\]{2}
(with a non-capturing group to eat the optional "|bar" but a compulsory "]]" at
the end)
Comment 3 Rowan Collins [IMSoP] 2005-07-05 18:44:02 UTC
> (In reply to comment #2)
> > \[{2}(.*?)(?:\||\]{2})
> 
> Won't that match unclosed piped links like "#redirect [[foo|" and "#redirect
> [[foo|bar"?

Confirmed: see http://en.wikipedia.org/w/index.php?title=User:IMSoP/sandbox,
which contains "#REDIRECT [[User:IMSoP/Gangleri|Foo" (and
http://en.wikipedia.org/wiki/Special:Whatlinkshere/User:IMSoP/Gangleri which
fails to list this non-link, as you'd expect).

This bug is most definitely not fixed, ladies and gentlemen. I've long thought
redirect detection should be integrated into Parser.php somehow, where it could
just use the existing logic for discovering a link; at least then it would be
*consistent* (and cf bug 2333).
Comment 4 Nicolas Dumazet 2008-03-14 21:28:30 UTC
Created attachment 4717 [details]
regex fix

Bug was still alive. (see http://fr.wikipedia.org/w/index.php?title=Utilisateur:NicDumZ/Test_2&redirect=no)

Included IMSoP's patch which is appropriate.
Comment 5 Nicolas Dumazet 2008-03-14 21:44:29 UTC
Created attachment 4718 [details]
regex fix (typo)

Fixing a typo in the proposed patch.
Comment 6 Alexandre Emsenhuber [IAlex] 2008-03-14 21:57:45 UTC
Fixed in r31996.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links