I'm using trunk of SMW and trying to create an RSS feed like this:
{{#ask: [[Category:Book Pile]] [[Added by::+]] [[Added on::+]]
? Added by = creator |
? Added on = date |
sort=Added on |
order=DESC |
format=rss |
rsstitle=Book Pile |
rssdescription=Latest suggestions of books to consider reading. |
}}
The feed will work if "= creator" and "= date" are not set. If they are set, I get the following PHP error.
PHP Fatal error: Call to undefined method SMWDIWikiPage::getShortWikiText() in /srv/www/mediawiki/public_html/w/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_RSSlink.php on line 75
PHP Fatal error: Call to undefined method SMWDITime::getXMLSchemaDate() in /srv/www/mediawiki/public_html/w/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_RSSlink.php on line 79
The code in question is the method call on $entry here
if ( strtolower( $req->getLabel() ) == 'creator' ) {
foreach ( $field->getContent() as $entry ) { $creators[] = $entry->getShortWikiText(); }
} elseif ( ( strtolower( $req->getLabel() ) == 'date' ) && ( $req->getTypeID() == '_dat' ) ) {
foreach ( $field->getContent() as $entry ) { $dates[] = $entry->getXMLSchemaDate(); }
}
I tried to see if I could figure out a patch but it wasn't obvious to me.
Version: unspecified
Severity: normal