From: Ning Hu <ni...@te...> - 2011-11-02 08:50:19
|
Hi Samuel, Thanks for the feedback. I just commit a new version to MW svn, to support SMW 1.6. Hope it works. Passed a quick test in SMW 1.6.1, with womget api. api.php?action=womget&title=Main%20Page&xpath=//property&type=xml svn+ssh://mediawiki/svnroot/mediawiki/trunk/extensions/WikiObjectModel rev 101590 Thanks, Ning On Wed, Nov 2, 2011 at 12:07 PM, Samuel Lampa <sam...@ri...>wrote: > Hi, > > I realized now, it seems WOM is not updated to support SMW 1.6, according > to the error I got below [1]. Is that correct? If so, what is the status > and plans for SMW 1.6 support? > > [1] When adding a property on my test page, I got this error: > > Catchable fatal error: Argument 1 passed to SMWDataValueFactory::**newPropertyObjectValue() > must be an instance of SMWDIProperty, instance of SMWPropertyValue given, > called in /home/samuel/www/smw-trunk-**rdfio2/extensions/** > WikiObjectModel/includes/**models/WOM_OM_Property.php on line 40 and > defined in /home/samuel/www/smw-trunk-**rdfio2/extensions/** > SemanticMediaWiki/includes/**SMW_DataValueFactory.php on line 162 > > for the line: > $wom = WOMProcessor::getPageObject($**title); > > Best Regards > // Samuel > > > > On 11/02/2011 04:48 AM, Samuel Lampa wrote: > >> Hi again, >> >> Indeed, now I got the example to work! >> >> There are a few typos in there though, that I thought to mention, so new >> users can be saved the trouble :) : >> >> 1. The exception variable in the catch statment lacks the '$' char. >> 2. xpath matching string used in the WOMProcessor::getObjIdByXPath call, >> is not closed. >> 3. The summary variable in the $article->doEdit() call is not >> initialized, (giving an error from the database the "rc_comment" can't >> be null). >> >> Thanks for the help! Will continue play with it and see if I can make it >> do what I want ... >> >> Cheers, >> // Samuel >> >> On 11/01/2011 01:49 AM, Samuel Lampa wrote: >> >>> Thanks Jesse and Ning for the replies! >>> >>> (I just saw your mails, they got sorted incorrectly in my mailbox...) >>> >>> Will try out the updated code! >>> >>> // Samuel >>> >>> On 10/30/2011 12:03 PM, Ning Hu wrote: >>> >>>> <sniP> >>>> >>>> The first code piece in the sample is to get the first sentence object. >>>> Code piece to get the 'first text' is not there. Text object is inside >>>> sentence object. >>>> Sorry for the misleading, I just update the document. >>>> >>>> http://wiking.vulcan.com/dev/**index.php/Extension:Wiki_** >>>> Object_Model/Functions#Set_**Wiki_object<http://wiking.vulcan.com/dev/index.php/Extension:Wiki_Object_Model/Functions#Set_Wiki_object> >>>> >>>> Hope it will help. >>>> >>>> Thanks, >>>> Ning >>>> >>> > > -- > Samuel Lampa > ------------------------------**--------- > Bioinformatician @ Uppsala University > Blog: http://saml.rilspace.org > ------------------------------**--------- > |