Page MenuHomePhabricator

Fatal error: Class 'parent' not found in /var/www/mediawiki-1.19.4/extensions/Validator/includes/definitions/ParamDefinition.php on line 934
Closed, DeclinedPublic

Description

Author: zimage

Description:
After upgrading semantic mediawiki, the Maps extension is acting wonky. Creating a new page with the simple text

results in the following fatal error:

Fatal error: Class 'parent' not found in /var/www/mediawiki-1.19.4/extensions/Validator/includes/definitions/ParamDefinition.php on line 934

I installed xdebug and have the following call trace
Call Stack
# Time Memory Function Location
1 0.0003 85700 {main}( ) ../index.php:0
2 0.1283 12671392 MediaWiki->run( ) ../index.php:58
3 0.1283 12671392 MediaWiki->main( ) ../Wiki.php:503
4 0.1357 13563844 MediaWiki->performRequest( ) ../Wiki.php:593
5 0.1432 14238396 MediaWiki->performAction( ) ../Wiki.php:278
6 0.1433 14238396 SubmitAction->show( ) ../Wiki.php:484
7 0.1433 14238396 EditAction->show( ) ../EditAction.php:71
8 0.1508 15176736 EditPage->edit( ) ../EditAction.php:51
9 0.1665 16248396 EditPage->attemptSave( ) ../EditPage.php:357
10 0.1666 16248396 EditPage->internalAttemptSave( ) ../EditPage.php:960
11 0.1723 16604964 Article->doEdit( ) ../EditPage.php:1435
12 0.1723 16604964 Article->__call( ) ../Article.php:0
13 0.1723 16604964 call_user_func_array ( ) ../Article.php:1783
14 0.1723 16604964 WikiPage->doEdit( ) ../Article.php:0
15 0.1795 17342708 WikiPage->prepareTextForEdit( ) ../WikiPage.php:1290
16 0.2128 19597120 Parser->parse( ) ../WikiPage.php:1522
17 0.2131 19615964 Parser->internalParse( ) ../Parser.php:345
18 0.2131 19615964 Parser->replaceVariables( ) ../Parser.php:1094
19 0.2135 19617636 PPFrame_DOM->expand( ) ../Parser.php:2981
20 0.2136 19617636 Parser->braceSubstitution( ) ../Preprocessor_DOM.php:1043
21 0.2138 19617636 call_user_func_array ( ) ../Parser.php:3192
22 0.2138 19617636 ParserHookCaller->runFunctionHookObj( ) ../Parser.php:0
23 0.2138 19617636 ParserHook->renderFunctionObj( ) ../ParserHook.php:636
24 0.2140 19618644 call_user_func_array ( ) ../ParserHook.php:337
25 0.2140 19618644 ParserHook->renderFunction( ) ../ParserHook.php:0
26 0.2140 19618644 ParserHook->validateAndRender( ) ../ParserHook.php:295
27 0.2238 20453400 Validator->validateParameters( ) ../ParserHook.php:372
28 0.2238 20453400 Validator->doParamProcessing( ) ../Validator.php:281
29 0.2253 20581460 Param->format( ) ../Validator.php:341
30 0.2376 20788248 ParamDefinition::newFromParameter( ) ../Param.php:254
31 0.2376 20788248 ParamDefinition::newFromType( ) ../ParamDefinition.php:543

Please let me know what other info I should provide.


Version: REL1_19-branch
Severity: major
OS: Linux
Whiteboard: aklapper-moreinfo

Details

Reference
bz45858

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:27 AM
bzimport set Reference to bz45858.
bzimport added a subscriber: Unknown Object (MLST).

zimage wrote:

I put a line in the Validator code to dump the object that they're having problems validating. Here it is.

object(Parameter)[248]

public 'trimValue' => boolean true
protected 'dependencies' => 
  array
    empty
protected 'default' => string 'googlemaps3' (length=11)
protected 'name' => string 'mappingservice' (length=14)
protected 'type' => string 'class-parent' (length=12)
protected 'aliases' => 
  array
    0 => string 'service' (length=7)
protected 'criteria' => 
  array
    0 => 
      object(CriterionInArray)[243]
        protected 'allowedValues' => 
          array
            ...
        protected 'careAboutCapitalization' => boolean false
protected 'manipulations' => 
  array
    0 => 
      object(MapsParamService)[255]
        protected 'feature' => string 'display_map' (length=11)
public 'originalName' => string 'mappingservice' (length=14)
protected 'originalValue' => null
protected 'value' => string 'googlemaps3' (length=11)
protected 'setCount' => int 0
protected 'errors' => 
  array
    empty
public 'applyManipulationsToDefault' => boolean true
protected 'defaulted' => boolean true
protected 'description' => boolean false
protected 'message' => boolean false

Can you specify the versions of the software you are using?

zimage wrote:

MediaWiki 1.19.4
PHP 5.2.4
Maps 1.0.5
Validator 0.5.1

zimage wrote:

Oops. Upgraded from SemanticMediaWiki 1.7.0.2 to 1.8.0.4. What's really odd is that the error happens even when I disable all the semantic extensions.

The combination of the old version of Maps you have together with either SMW 1.8 or Validator 0.5 is not supported. I'd suggest upgrading to Maps 2.0.x if you where running PHP 5.3 or later, but you are not. I suggest upgrading your PHP and then Maps.

(In reply to comment #6)

The combination of the old version of Maps you have together with either SMW
1.8 or Validator 0.5 is not supported. I'd suggest upgrading to Maps 2.0.x if
you where running PHP 5.3 or later, but you are not. I suggest upgrading your
PHP and then Maps.

Tim: Did you have time to try this?

No answer to comment 6 and comment 7, hence assuming that the problem was solved by the reporter.