Last modified: 2014-01-23 02:08:56 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 T25693, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23693 - The syntax of the {{{info}}} field is 'fragile'
The syntax of the {{{info}}} field is 'fragile'
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-28 10:27 UTC by Dan Bolser
Modified: 2014-01-23 02:08 UTC (History)
1 user (show)

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


Attachments

Description Dan Bolser 2010-05-28 10:27:28 UTC
I'm using the {{{info}}} form field to specify a page name so that I can use the #forminput; parser function. However, I find that the syntax of the field is incredibly 'fragile', which really hampers my 'debugging' process (using forminput can be confusing, especially if it requires a complex 'query strying').

For example, this fails to correctly start the page name unique number at 0:
{{{info | page name=Dummy page <unique number; start = 0>}}}

But this works (no spaces between the final equals sign):
{{{info | page name=Dummy page <unique number; start=0>}}}


Similarly, this fails to correctly set the page name at all:
{{{info | page name = Dummy page <unique number; start=0>}}}

But this works (no space between the first equals sign):
{{{info | page name=Dummy page <unique number; start=0>}}}


Finally, this fails to correctly set the page name at all:
{{{info 
 | page name=Dummy page <unique number; start=0>
}}}


All of the above attempts around the correct syntax were tried in a effort to make the form tags more readable, making the overall form easier to understand (especially for beginners). I think white space, including newlines, is generally accepted to improve readability, and should be encouraged.

The failure of these syntax variants is inconsistent with the way templates (and often parser functions) work in MW.


Similar problems may affect the other form tags, but this has not been investigated.
Comment 1 Dan Bolser 2010-05-28 10:28:50 UTC
I've been meaning to go into the code and fix these 'issues' myself, but given the length of time that I've been meaning to do this, I thought I'd better log a bug so that I don't forget!

Also, it will give me a nice item to tick off if I ever get round to looking at the code behind this ;-)
Comment 2 Dan Bolser 2010-05-28 10:50:47 UTC
Further to the above bug report, here is an example of yet more fragility...

Above we were allowed the space after the | character when specifying the 
'page name' parameter of the form's info tag. However, we are apparently not allowed this space when specifying the 'create title' or 'edit title' parameters of the form's info tag:

This fails to correctly set the create or edit title of the form:
{{{info | create title=Create xoxox | edit title=Edit xoxoxo | ... }}}

But this works (no space after the | character for these parameters):
{{{info |create title=Create xoxox |edit title=Edit xoxoxo | ... }}}


Again, I like white space because I believe it increases the readability of the tag (and form).

I'd really like to write it like this:

{{{info
 | create title = Create xoxox
 | edit title   = Edit xoxoxox
 | page name    = Dummy page < unique number; start = 0 >
}}}
Comment 3 Yaron Koren 2014-01-23 02:08:56 UTC
I believe this is now fixed. Fragile no more!

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


Navigation
Links