Last modified: 2013-02-06 09:38:48 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 15735 - Non-clickable links (from #ifexist) should be flagged in pagelinks
Non-clickable links (from #ifexist) should be flagged in pagelinks
Status: RESOLVED DUPLICATE of bug 12019
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-26 16:26 UTC by MZMcBride
Modified: 2013-02-06 09:38 UTC (History)
2 users (show)

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


Attachments

Description MZMcBride 2008-09-26 16:26:04 UTC
[[{{#ifexist:Category:Ifexist baz bar|Category:Ifexist baz bar}}]]

That is the test case. Currently, it puts an entry in pagelinks and in categorylinks.

However, having an entry in pagelinks for a link that isn't clickable is unintuitive and confusing (in API results, etc.).

A new column to flag non-clickable links that have a pagelinks entry is a possible solution.
Comment 1 Splarka 2009-04-07 19:10:34 UTC
The same thing happens with an escaped category link, for example [[:Category:Foo]].

http://en.wikipedia.org/w/api.php?action=parse&text=%5B%5B%3ACategory%3AFoo%5D%5D+%7B%7B%23ifexist%3ACategory%3ABar%7D%7D
[[:Category:Foo]] {{#ifexist:Category:Bar}}

    <links>
      <pl ns="14">Category:Bar</pl>
      <pl ns="14">Category:Foo</pl>
    </links>
Comment 2 MZMcBride 2009-05-25 05:25:39 UTC
Re-opening. Not sure why this is closed as INVALID.
Comment 3 Paul McCue 2009-07-18 22:24:34 UTC
I've just run up against this problem myself.  To clarify the current behaviour:

An #ifexist test on a nonexistent category ("{{#ifexist:Category:NoSuchThing|[[Category:NoSuchThing]]}}") results in an entry in pagelinks, but none in categorylinks.    A test on a category that does exist ("{{#ifexist:Category:People|[[Category:People]]}}") generates entries in both tables.

From this we can attribute the entry in pagelinks to the #ifexist test itself, and the entry in categorylinks to its parsed result ("" and "[[Category:People]]" for the examples above).

I'd imagine the pagelinks entry has to exist to ensure the page containing the #ifexist test is properly re-evaluated should someone come along and create (or un-create) its subject.

This is definitely a PITA for those working from the database alone though;  ideally such entries should be stored elsewhere ('pageexistslinks') to keep the semantics of the pagelinks table clear.  I'd imagine there are performance gains to be had by doing so also - only a subset of the usual tests make against pagelinks would need to test pageexistslinks also.
Comment 4 Splarka 2009-07-19 06:22:42 UTC
> I'd imagine the pagelinks entry has to exist to ensure the page containing the
> #ifexist test is properly re-evaluated should someone come along and create (or
> un-create) its subject.

Exactly. that is bug 10857.

Probably.(In reply to comment #2)
> Re-opening. Not sure why this is closed as INVALID.

Well, how about a dupe then. Bug 12019 looks good. But really, this is an expected behavior.

*** This bug has been marked as a duplicate of bug 12019 ***

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


Navigation
Links