From: Tomás V. <kas...@gm...> - 2010-11-16 00:44:16
|
Hi Markus, thanks for your quick response. Finally I found a quick and dirty solution for this problem which consists in comment the following code in $IP/extensions/ SemanticResultFormats/Gallery/SRF_Gallery.php: // Only add real images (bug #5586) // if ( $imgTitle->getNamespace() == NS_IMAGE ) { // $wgParser->mOutput->addImage( $imgTitle->getDBkey() ); // } Also I've temporally added the following sentence to see what is going on: printf("%s: %s - %s<br>", $imgTitle, $imgTitle->getNamespace(), NS_IMAGE, $imgTitle->getDBkey()); Results: Archivo:1268 01.jpg -> 6 - 6 - 1268_01.jpg Archivo:Adobe logo.jpg -> 6 - 6 - Adobe_logo.jpg Archivo:Ant-iman.jpg -> 6 - 6 - Ant-iman.jpg Archivo:Balonmanonava.jpg -> 6 - 6 - Balonmanonava.jpg Archivo:Becerril.jpg -> 6 - 6 - Becerril.jpg Archivo:Bodon.jpg -> 6 - 6 - Bodon.jpg Archivo:Caminodesantiagodesdemadrid.jpg -> 6 - 6 - Caminodesantiagodesdemadrid.jpg Archivo:Cano.jpg -> 6 - 6 - Cano.jpg Archivo:Casado.jpg -> 6 - 6 - Casado.jpg Archivo:Castillodecoca.jpg -> 6 - 6 - Castillodecoca.jpg I don't understand semantic mediawiki internals but I don't see anything strange here so as Markus suggest it must be related with some bug in SRF module. I haven't coded in PHP since many years ago so I don't have the neccesary skills to search and fix tihs bug. I think I will fill in a bug. Just for the record, I have installed last stable version (1.16) with semantic bundle (version 0.4.2.20100719). Mediawiki and the semantic properties are very hispanicized (I remember to have had some problem with semantic properties before becouse their names are in spanish). Regards, t00m 2010/11/14 Markus Krötzsch <ma...@se...> > [Moving thread to semediawiki-user list, future mails should not go to > mediawiki-l any more] > > Sorry about that > > On 14/11/2010 19:49, Tomás Vírseda wrote: > >> Hi everybody, >> >> I'm getting the following error when using the format 'gallery' in a >> semantic query: >> >> >> *Fatal error*: Call to a member function addImage() on a non-object in * >> /home/wikinava/ >> >> wikinava.org/portal/mediawiki/extensions/SemanticResultFormats/Gallery/SRF_Gallery.php >> * on line *74 >> >> *Has it ever happened this to someone? >> >> I'm googling this error but I can't find any result suitable for my >> problem. >> >> any ideas? >> >> This is the query: >> >> http://wikinava.org/portal/mediawiki/index.php?title=Especial%3AAsk&q=[[Categor%C3%ADa%3AMultimedia]]&po=&sort_num=&order_num=ASC&eq=yes&p[format]=gallery&p[limit]=20&p[headers]=&p[mainlabel]=&p[link]=&eq=yes >> > > Such issues typically occur if some "element" that is to be processed > (probably images or pages with images in your case) has a title that is not > allowed (for whatever reason, maybe there was some change in what is > allowed, or something was messed up when handling a title with special > symbols, or there are simply outdated values in the database that were > encoded in a way that differs from the current encoding). In any case, there > is an error in the software that needs to be fixed (the software should > check if the title is valid). Check that your versions of the MW, SMW, and > SRF are compatible (SRF has not seen a new release since a while). > > Now SRF is an extension to SMW that just collects rather independent code > from many developers, so the stability of the different formats varies. The > best way to make the current maintainer of the gallery code aware of the > issue is to enter a bug report at http://bugzilla.mediawiki.org/ The > proper list to address for SMW-related support is the semediawiki-user > mailing list, CCed in this reply. > > Regards, > > Markus > > > >> Regards, >> t00m >> _______________________________________________ >> MediaWiki-l mailing list >> Med...@li... >> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l >> >> > |