Last modified: 2007-11-02 18:51:18 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 T13666, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11666 - unescaped page name makes smw_notitle error confusing
unescaped page name makes smw_notitle error confusing
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Low minor (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-15 10:19 UTC by S Page
Modified: 2007-11-02 18:51 UTC (History)
0 users

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


Attachments

Description S Page 2007-10-15 10:19:40 UTC
Create the relation [[My Prop::[[Test]] ]] on a page.

The extra [[ ]] around the object's title aren't needed and cause problems.

So the factbox (correctly) displays an error triangle and the popup shows
“Test” cannot be used as a page name in this wiki.

But this error message is quite confusing as Test appears as a normal wiki link.  "Test" is fine, it's the wiki markup that you don't see in the error text that causes problems.

It would be more obvious if the error text was escaped to show the actual text you entered, i.e.
“[[Test]]” cannot be used as a page name in this wiki

I tried wrapping the page title in <nowiki> in SMW_DV_WikiPage.php:
  $this->addError(wfMsgForContent('smw_notitle', "<nowiki>$value</nowiki>"));
and it didn't make any difference.

According to http://www.mediawiki.org/wiki/Extension:Character_Escapes, "we have to use escapes to prevent markup being parsed prematurely. MediaWiki does not have built-in mechanic for this".

So maybe this is hard to fix.
Comment 1 Markus Krötzsch 2007-10-18 14:56:55 UTC
I think we will jsut change it so that [[ ]] are stripped from page titles in this place. This does not fix the problem in general, but maybe for most cases. Other than this, one can always replace "[" by its HTML-UTF-escape.

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


Navigation
Links