Page MenuHomePhabricator

Fatal PHP Error in Translate/tag/RenderJob.php on line 48 on marking content as translatable
Closed, ResolvedPublic

Description

Author: opensource

Description:
After adding '<translate>' and '</translate>' around the content of an existing page (within no namespace), clicking "Mark this site for translation" and "Mark this version for translation", I'm getting this fatal PHP error:

Fatal error: Call to a member function initCollection() on a non-object in /srv/www/htdocs/wiki/extensions/Translate/tag/RenderJob.php on line 48

PHP 5.3.5
MySQL 5.1.57
MediaWiki 1.18.1
Translate 2011-07-09
Replace Text 0.9.1
Babel 1.7.1
ParserFunctions 1.4.0
Clean Changes 2008-10-16
ConfirmEdit 1.0
Language Names 1.9.0 (CLDR 1.9M2)
Narayam 0.1


Version: unspecified
Severity: major
OS: Linux

Details

Reference
bz35297

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:13 AM
bzimport set Reference to bz35297.

yeah... $page->getMessageGroup() can return null

I was going to add

		if ( !$collection ) {
			$this->setLastError( 'RenderJob: Invalid collection' );
			return false;
		}

but with the error handling as

		if ( !$page ) {
			var_dump( $this->params );
			var_dump( $title );
			throw new MWException( "Oops, this should not happen!" );
		}

just above it...

The steps to reproduce are not clear to me. Can you please provide them? I would also advise you to use the latest trunk version of Translate. It should work on MediaWiki 1.18.1 (or the latest stable version). A lot has changed since 2011-07-09. You can download it at https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Translate.

opensource wrote:

Could not reproduce this bug with the recent version. Thus closing it.