Last modified: 2007-01-31 05:29:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8837 - don't warn if attribute of Type:Float has a unit
don't warn if attribute of Type:Float has a unit
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: S Page
Depends on:
  Show dependency treegraph
Reported: 2007-01-31 04:11 UTC by S Page
Modified: 2007-01-31 05:29 UTC (History)
1 user (show)

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


Description S Page 2007-01-31 04:11:20 UTC
In earlier versions of SMW, you could have [[Infant mortality rate:=4.12
deaths/1,000 live births]] and if the attribute is of Type:Float, SMW would just
remember the unit in smw_attributes.value_unit.

Now, including a unit results in a warning in the factbox "this attribute
supports no unit conversion" and the help warns against it.  The only way to
avoid this warning is to create a type with custom units.
Comment 1 S Page 2007-01-31 05:29:01 UTC
The fix is just to tweak SMWFloatTypeHandler->getUnitId() in SMW_DT_Float.php to
not return smw_unexpectedunit (which is then unused).

However, maybe the warning is useful to show once in searches?  The idiom of
"return (value, $errStr)" doesn't work well for returning a warning or an error.

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