Last modified: 2011-06-01 19:15:19 UTC
When SMWSQLStore2::getPropertyValues() is called for a specific page (i.e., with a non-null $subject), the $property argument has to have been created with a property name that has underscores instead of spaces, for the call to work; I assume that's a bug. This can be fixed by adding the following line to the beginning of SMWSQLStore2::getSMWPageIDandSort(): $title = str_replace( ' ', '_', $title ); ...but maybe there are better ways to solve it.
This is not a bug. SMWDIProperty objects are initialized by a property "key". This key can have two forms: either it is the MediaWiki DBkey of a property page (for user-defined properties), or it is the key for a registered special property of SMW (a string starting with "_"). If you want to create SMWDIProperty objects from a user-provided label, or from a text that might be the (normalized) label of a special property (and you are not sure), then you should use the SMWDIProperty::newFromUserLabel(). Overall, you should always be able to generate a suitable SMWDIProperty for the store call in one line. SMWDIProperty could implement additional checks to throw exception when the "key" has a space in it, but this would take additional time that we might rather want to safe there. General clean-up and "best effort" input interpretation on the other hand is not meant to happen in DI classes but in the according DVs. Using a DV is usually the best solution when user input is processed (with all its possible messiness, e.g. leading spaces).
Okay, thanks for the clarification. I've switched the SF code to also use SMWDIWikiPage::newFromTitle() now, instead of "new SMWDIWikiPage()", for the same reason.