Hi David, your analysis of the problem seems to be accurate. The immediate bug here is that the RSS printer misses a check to avoid crashing. I have added this check now in SVN.
Your particular problem should be related to query processing: there are cases
when queries do not contain a wiki page as their first result. This normally
happens if the query restricts results to a single page. This is somewhat
historical, and was intended to lead to more useful outputs when the user
already knows the page. For example, the query {{#ask: [[Test]] | ?property }}
shows only the value of "property" for "Test" but not a table with two columns
"Test" and "property".
I can imagine that this happens in your case based on local language settings.
Language settings affect query syntax. Writing [[Category:Test]] will ask for
values of the category Test on an English wiki, but not on a German one where
[[Category:Test]] is a valid page name that has nothing to do with categories.
Of course, MW now has alias namespaces and largely supports English versions
as well, and SMW should probably do the same.
Anyway, as it is now, you may have to write something like
"[[Kategorie::Test]]" in queries (or whatever your local language name for
"category" is).
I intend to change the internal query result structures at some point, and
this will also lead to a more adequate behaviour in these cases. Right now,
all you get after my earlier fix is an empty RSS feed (which is not strictly
correct RSS either), but at least not an error.
Cheers,
Markus
On Sonntag, 28. Juni 2009, David Raison wrote:
> Hi,
>
> Sorry if this came up already. but either I can't figure out how to
> search the mailing list archive or there simply is no search function?
>
> Anyway, the problem I'm having and which I could NOT reproduce on
> http://sandbox.semantic-mediawiki.org/wiki/User:Kwisatz is the following:
>
> *Fatal error*: Call to undefined method SMWURIValue::getTitle() in
> */var/www/hackerspace.lu/www/w/extensions/SemanticMediaWiki/includes/SMW_QP
>_RSSlink.php* on line *83
> *(occuring here:
> https://www.hackerspace.lu/wiki/Special:Ask/-5B-5B:Links-5D-5D/-3FUrl%3D/so
>rt%3D/order%3DDESC/format%3Drss/limit%3D10)*
>
> *I looked into this and indeed, neither the SMWURIValue class, nor the
> the SMWDataValue class, which SMWURIValue extends, do have a method
> called getTitle().
> The only class that has such a function is the SMWWikiPageValue class
> in includes/SMW_DV_Wikipage.php.
>
> Indeed, the var in SMWRSSResultPrinter is named $wikipage, so I guess
> it is expected to hold a SMWWikiPageValue object (67: $wikipage =
> $row[0]->getNextObject(); // get the object)
> Now, why is my SMWRSSResultPrinter returning a SMWURIValue object instead?
>
> I'm using svn revision 52503 of SMW and MediaWiki 1.15.0
>
> cheers,
> David
> *
> *
--
Markus Krötzsch
Semantic MediaWiki http://semantic-mediawiki.org
http://korrekt.org [email protected]
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------
_______________________________________________ Semediawiki-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
