Last modified: 2008-08-15 05:45:09 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 T16357, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14357 - Semantic Forms short-circuts the new wfLoadExtensionMessages system and tests incorrectly
Semantic Forms short-circuts the new wfLoadExtensionMessages system and tests...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Yaron Koren
http://svn.wikimedia.org/viewvc/media...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-31 03:42 UTC by Daniel Friesen
Modified: 2008-08-15 05:45 UTC (History)
0 users

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


Attachments

Description Daniel Friesen 2008-05-31 03:42:28 UTC
There are two issues with what Semantic Forms is doing with Message Loading.

Firstly an incorrect test is used to check for the existence of the system:
if (version_compare($wgVersion, '1.11', '>=' ))
Is not the correct method, this is:
if( method_exists('wfLoadExtensionMessages') )
It's possible for someone to have a alpha version of 1.11 which has not yet been updated to the revision where the extension message system was introduced. Using this check does handle all cases correctly.

But that's the minor issue.
The real issue is that Semantic Forms is short-circuiting the whole system, and effectively making the new system useless because SF is acting the same as if the system didn't exist:

After checking if the system exists, SF adds to the list:
$wgExtensionMessagesFiles['SemanticForms'] = $sfgIP . '/languages/SF_Messages.php';

However, inside of an extension function, it goes and runs:
wfLoadExtensionMessages('SemanticForms');

This is NOT the correct way to do this.

Effectively, this means that all messages are loaded, on every page view, all the time. Even in later versions of MediaWiki where the system exists with the point of not doing that.

wfLoadExtensionMessages is only supposed to be run when you need those messages. In essence, you only use it when you initialize a special page, or are somewhere you need to call wfMsg.
Comment 1 Yaron Koren 2008-07-09 02:53:27 UTC
I believe this is fixed, as of the latest version, 1.2.6; could you please verify this?
Comment 2 Yaron Koren 2008-07-25 20:02:15 UTC
Marking as fixed.
Comment 3 Daniel Friesen 2008-08-15 05:45:09 UTC
Nope, it wasn't fixed.

As of r39383 I believe I have the bug fixed. Poke me if you start seeing any <messagename>'s around.

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


Navigation
Links