Last modified: 2014-08-17 11:41:00 UTC
Sometimes, and with no obvious pattern, I get a fatal error saying “Call to a member function getPrefixedDBkey() on a non-object in /var/www/w/includes/cache/LinkCache.php on line 164”. It occurs on pages containing a gallery, where there is an internal link ([[link]]) in the caption on one or more images, and is solved by editing the page (this is still possible) and through trial and error removing the guilty image(s) from the gallery. The same image will still work, with or without link in the caption, when used in another gallery. MediaWiki 1.22alpha (af3f05e) PHP 5.3.3-7+squeeze15 (apache2handler) MySQL 5.1.66-0+squeeze1 (http://xn--ssongsmat-v2a.nu/ssm/Special:Version)
A full trace might be helpful to track this down a bit more. See http://www.mediawiki.org/wiki/Manual:How_to_debug
Hmm, I'm not sure exactly what to do, but I added this to LocalSettings.php: error_reporting( E_ALL ); ini_set( 'display_errors', 1 ); $wgShowExceptionDetails = true; This is the full message I get: <code> Notice: Undefined index: title in /var/www/w/includes/parser/LinkHolderArray.php on line 297 Notice: Undefined index: title in /var/www/w/includes/parser/LinkHolderArray.php on line 375 Fatal error: Call to a member function getPrefixedDBkey() on a non-object in /var/www/w/includes/cache/LinkCache.php on line 164 </code>
Can you give a example wikitext to generate this error?
Leonard: Can you give a example wikitext to generate this error?
After some more digging I think I found out when this happens: Always and only when the gallery is used on the same page as an Semantic Internal Object of the SIO extension from the Semantic MediaWiki family. This code should trigger the error: <gallery> Fil:Sildefiske_i_Bodø.jpg|Fishing in [[Norway]] </gallery> {{#set_internal:My SIO}} I have not tested this in the latest available versions of these extensions, so this bug should probably be closed for now.
For reference, this appears to be a Semantic Internal Objects issue, that's only listed under Semantic Forms because there's no SIO Bugzilla component.