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

       Web browser: ---
            Bug ID: 47472
           Summary: Fatal error for multiple instances of records in
                    subobjects
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: Semantic MediaWiki
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

I'm running MediaWiki 1.20 and SMW 1.8.4, newly setup testing wiki. 

TextProperty is a normal Property (type String), RecordProperty is a Record,
properly set-up with their own properties, and types, in this case:
Page;Number.


This:

{{#subobject: Test
 | TextProperty = Test
 | RecordProperty = Testing;123
}}

{{#subobject: Test
 | TextProperty = Test2
}}

works without flaws, and adds everything to the same subobject, just as #set
still works when used multiple times with the same properties. 

Now, if I move the RecordProperty declaration to the 2nd #subobject, the wiki
will error out with an exception:

{{#subobject: Test
 | TextProperty = Test
}}

{{#subobject: Test
 | TextProperty = Test2
 | RecordProperty = Testing;123
}}

Cannot add subdata. Are you trying to add data to an SMWSemanticData object
that is already used as a subdata object?
Backtrace:
#0 .../extensions/SemanticMediaWiki/includes/SMW_SemanticData.php(442)<...>:
SMWSemanticData->addSubSemanticData(Object(SMWContainerSemanticData))

I don't exactly know what SMWSemanticData objects are supposed to be (are
subobjects?), and what the notion of subdata objects is in this context, and
the documentation was a little unhelpful regarding that, too, so I can't say if
what the error message really says is what I am doing there.

In 1.7, this worked fine, and would add the record data to the #Test subobject
just fine. Am I doing anything that just worked because I was lucky (I supposed
the behavior for #set and #subobject was intended to be the same) or is there a
deeper bug to this? If at all, this error case should be handled more
gracefully than throwing an exception.

I'm using templates on the wiki to hide all the SMW magic, and being able to
declare the SMW subobject data in multiple calls to #subobject helps to keep
their source code tidier.

-- 
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
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to