Last modified: 2013-03-13 16:07:48 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 T47748, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45748 - TemplateSandbox should be forgiving about first-character-lowercase, just like "real" pages
TemplateSandbox should be forgiving about first-character-lowercase, just lik...
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
TemplateSandbox (Other open bugs)
unspecified
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-05 19:57 UTC by kipod
Modified: 2013-03-13 16:07 UTC (History)
2 users (show)

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


Attachments

Description kipod 2013-03-05 19:57:13 UTC
if "Template:Foo" exists, {{foo}} will transclude it (unlike {{FOO}} ).

Note that the user might have tried to create [[Template:foo]] in the first place, and the system did her a favor and created [[Template:Foo]] instead. 
to compensate for this unsolicited substitution, the system is nice enough to recognize {{foo}}.

However, when the user creates [[User:JaneDoe/sandbox/Template:foo]], the system will not replace it with [[User:JaneDoe/sandbox/Template:Foo]], and in the sandbox, {{foo}} will look for [[Template:Foo]] (in template namespace) but will ignore [[User:JaneDoe/sandbox/Template:foo]].

Same exact thing for [[User:JaneDoe/sandbox/Model:bar]]

IMO, the sandbox should imitate the behavior of the system as much as possible. In this case, i think that when i use {{foo}} (or {{Foo}} ) in the sandbox, the system should look for any of <sandboxprefix>/template:foo, <sandboxprefix>/template:Foo, <sandboxprefix>/Template:foo or <sandboxprefix>/Template:Foo.

no need to look for <sandboxprefix>/tEmplAte:fOo, of course.

same exact thing should be for (m|M)odel/(b|B)ar, and any other namespace the Sandbox might substitute.

peace.
Comment 1 Brad Jorsch 2013-03-05 20:27:14 UTC
The hard part being that normalizing {{foo}} to Template:Foo is easy, but denormalizing Template:Foo to every accepted case variation is not. It's not even particularly easy to know whether the character after the colon can be case-changed.

And then we'd have to iterate over all of those variations, testing if each one exists. And ignore the question of what to do if more than one does.

I think the best thing to do would probably be to just document more explicitly that the canonical title must be used in the sandbox.
Comment 2 Brad Jorsch 2013-03-13 16:07:48 UTC
If someone comes up with good code to do this, feel free to submit it to Gerrit. Until then, let's just go with the "document that the canonical title must be used in the sandbox" solution.

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


Navigation
Links