Last modified: 2012-01-14 17:20:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T35721, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33721 - Semantic MediaWiki PHP Error in RSS Query Printer when using creator or date labels
Semantic MediaWiki PHP Error in RSS Query Printer when using creator or date ...
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-14 13:42 UTC by Jamie Thingelstad
Modified: 2012-01-14 17:20 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jamie Thingelstad 2012-01-14 13:42:05 UTC
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.
Comment 1 Jamie Thingelstad 2012-01-14 13:43:07 UTC
Forgot to give you a link to this feed just in case. 

http://rwbookclub.com/wiki/RW_Book_Club:Feeds
Comment 2 Jeroen De Dauw 2012-01-14 14:59:31 UTC
Thanks for reporting this, seems like this issue was introduced in 1.6. Ought to be fixed by r108905 - can you confirm?
Comment 3 Jamie Thingelstad 2012-01-14 17:20:09 UTC
Confirmed. Updated to r108922 and it is all good now. Thanks Jeroen!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links