Page MenuHomePhabricator

After Semantic MediaWiki setup fatal error occures on every edit
Closed, ResolvedPublic

Description

Author: flame.beholder

Description:
I have a default installation of MediaWiki 1.9.3 and default installation of
SMW 0.7 atop of it. After setup each edit crashes with:
Fatal error: Call to a member function getSubject() on a non-object in /var/www/
wiki/extensions/SemanticMediaWiki/includes/SMW_Factbox.php on line 376

However edit completes successfully.


Version: unspecified
Severity: major
OS: Mac OS X 10.4
Platform: Macintosh
URL: http://hedin.academ.org/wiki

Details

Reference
bz9857

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 21 2014, 9:37 PM
bzimport set Reference to bz9857.
bzimport added a subscriber: Unknown Object (MLST).

luvmoose wrote:

I am just installing MediaWiki and Semantic MediaWiki from the latest onto a new
database. I'm seeing this bug too. And it seems to be creating template pages
for me when I encounter it, but not basic article pages (so I can't do SMWTest).

luvmoose wrote:

Update, it did create SMWTest eventually, but the Factbox does not appear.

info wrote:

This error implies something unexpected happened during the parseHook, so when the saveHook was called, it failed.

I couldn't reproduce with various combinations of $smwgEnableTemplateSupport and $smwgShowFactbox in SMW_Settings.php., but it seems it would be good to somehow test for errors in parsing and somewhere report them to users. I don't know whether it's worth having additional error checking in the saveHook.

ndavies wrote:

i get a similar problem on my installation of SMW 0.7 on MediaWiki 1.9.3 MySQL 5.0.37, PHP 5.2.1). If I edit content using the inline edit links by a header I get an error on save, however not when editing by clicking the edit tab at the top of the page.

nick.roux wrote:

Experienced the same problem with:

  • MediaWiki: 1.9.2
  • PHP: 5.2.0 (apache2handler)
  • MySQL: 5.0.27

then I noticed point (2) == Installation == in the INSTALL.TXT and added
wfRunHooks( 'InternalParseBeforeLinks', array( &$this, &$text ) );
to Parser.php

Problem gone and all seems to work well.

disfasia wrote:

Fatal error: Call to a member function getSubject() on a non-object in /home/lesouq86/public_html/lesouq/extensions/SemanticMediaWiki/includes/SMW_Factbox.php on line 376

This is the error I get when testing the extension.

please help!

disfasia wrote:

i just realized that nick's comment is correct. the info.doc that came in my mediawiki says to fix the parser.php for mediawiki 1.9 and earlier. But it ought to say all 1.9 versions, because 1.9.2 was also fixed by running the fix.