Last modified: 2014-01-23 02:07:27 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 T34533, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32533 - SemanticForms: fragile syntax for auto-generated page names.
SemanticForms: fragile syntax for auto-generated page names.
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-20 22:32 UTC by Van de Bugger
Modified: 2014-01-23 02:07 UTC (History)
1 user (show)

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


Attachments

Description Van de Bugger 2011-11-20 22:32:26 UTC
> {{{ info ... }}}

Note a space between `{{{' and `info'. It works in many cases. But in case of auto-generated form names:

> {{{ info ... | page name=Visit:<unique number;start=1>}}}

the space before `info' causes error. The problem is in `specials/SF_FormEdit.php', in `printForm' function:

> if ( $target_name === '' ) {
>     // parse the form to see if it has a 'page name' value set
>     $matches;
>     if ( preg_match( '/{{{info.*page name\s*=\s*(.*)}}}/m', $form_definition, $matches ) ) {

Obviously this will not match if there is a space between `{{{' and `info'.

Handling spaces should be consistent. SF should either allow spaces (include newlines) or disallows it.

The bug is not to serious, because there are simple workaround for it -- just write `{{{info' with no spaces. But, for novice users, it will be very frustrating and disappointing. It will looks like auto-generated page names are simply broken. 

(BTW, this issue in NOT related to bug 32485; last one is still a problem even if there is no space).
Comment 1 Yaron Koren 2014-01-23 02:07:27 UTC
Well, it only took 2+ years, but I finally checked in a fix for this problem, based on your suggestion. Thanks, and sorry for the long delay!

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


Navigation
Links