Last modified: 2007-01-31 05:29:01 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 T10837, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8837 - don't warn if attribute of Type:Float has a unit
don't warn if attribute of Type:Float has a unit
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: S Page
http://ontoworld.org/wiki/Attribute:I...
:
Depends on:
Blocks:
  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: ---


Attachments

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.


Navigation
Links