https://bugzilla.wikimedia.org/show_bug.cgi?id=31344

       Web browser: ---
             Bug #: 31344
           Summary: Erroneous records with duplicate properties
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Semantic MediaWiki
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: schweit...@ontoprise.de
                CC: jeroen_ded...@yahoo.com, mar...@semantic-mediawiki.org
    Classification: Unclassified


I define the property "Property:Married To" like this:

[[has type::Record]]
[[has fields::Has Husband;Has Child;Has Child]]

As far as I know it is allowed to have the same property (e.g. Has Child)
several times in a record, however, the order of annotations is not guaranteed.

Now an annotation in article "Mary":

[[Married To::Paul; Peter; John]]

This is rendered as:
Paul (Peter, Peter)

However, the expected value is:
Paul (Peter, John)

The fact box shows the property "Married to" but no values at all.

Furthermore, there seems to be a bug in the API of SMW. I try to retrieve all
properties of a record like this:

$relationTitle = Title::newFromText($relationName, SMW_NS_PROPERTY);
$relationDI = SMWDIWikiPage::newFromTitle($relationTitle);
$fieldsProp = SMWDIProperty::newFromUserLabel("_LIST");
$fields = smwfGetStore()->getPropertyValues($relationDI, $fieldsProp);

$fields should now be an array with all properties of the record. This works
well if there are no duplicate properties in the record. In the above example
it returns only "Has Husband" and "Has Child". The second occurrence of "Has
Child" is missing.


Best,
  Thomas

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to