Last modified: 2011-09-11 02:23:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18755, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16755 - Intentional use of multiple DEFAULTSORT blocked
Intentional use of multiple DEFAULTSORT blocked
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
1.14.x
All All
: Low enhancement with 4 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/Help:Cat...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-22 11:33 UTC by TMg
Modified: 2011-09-11 02:23 UTC (History)
2 users (show)

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


Attachments

Description TMg 2008-12-22 11:33:32 UTC
If an article contains two DEFAULTSORT, for example one in a template and one in the article, the second DEFAULTSORT overrides the first one. This was used as a feature. For example: The article contains an Infobox template. The template tries to set a "default" DEFAULTSORT. In rare cases this "default" DEFAULTSORT is not perfect (especially when the article name contains umlauts). A second DEFAULTSORT was added to these few articles and everything was fine.

This is still described as a feature at http://en.wikipedia.org/wiki/Help:Category#Default_sort_key

Now the second DEFAULTSORT triggers an ugly error.

Please remove this error. Or change the error message so it only appears if the article source _without_the_templates_ contains more than one DEFAULTSORT.
Comment 1 Purodha Blissenbach 2008-12-27 14:37:00 UTC
Just for the records:
There are several possible solutions to the problem:
1. without source code change:
1.1 localize the error message to something that does not
    display anything, e.g. "-" or "&x32;" or ""
1.2 Wrap the 2nd, and following, DEFAULTSORT(s) in a
    <span style="display:none">…</span>, or similar
    whenever you do not want an error to be shown
2. with source code alterations:
2.1 Omit the error message entirely
2.2 Add a parameter to DEFAULTSORT, supplying a local
    error message, which can be specified as an empty
    string
2.3 Add a parameter to DEFAULTSORT, suppessing the
    error message
2.4 Add a setting to the Wiki configuration that
    enables/disables the DEFAULTSORT error check
3. likely, there are more possibilites
Which would be best?
Comment 2 Purodha Blissenbach 2009-01-06 01:18:45 UTC
See also Bug # 16448
Comment 3 Bawolff (Brian Wolff) 2011-09-11 02:23:22 UTC
The replacing the message with something else is probably best if you never want to see that error

In r96767 (MediaWiki 1.19) I added a new option to defaultsortkey {{DEFAULTSORT:your sortkey here|noerror}} which will prevent the error message from showing up.

(At the same time I also added {{DEFAULTSORTKEY:your sortkey here|noreplace}} which will cause it to do nothing (including not outputting an error) if there was already a {{DEFAULTSORTKEY}} in the page.

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


Navigation
Links