Skip to content

Exception caught: Typed property MediaWiki\Parser\Parser::$ot must not be accessed before initialization #829

@bertrandgorge

Description

@bertrandgorge

Setup

  • Maps version: 13.0.0-alpha (setup with composer: 'mediawiki/maps "^12.0"')
  • MW version: 1.43.5
  • PHP version: 8.2.29
  • SMW version (if applicable): 6.0.1

Issue

When editing a page using VisualEditor, if the page contains a Map, I have the following exception (when accessing $this->getParser()->recursiveTagParseFully at line 440 of src/SemanticMW/QueryHandler.php).

[85520170fdea84c79286bab5] Exception caught: Typed property MediaWiki\Parser\Parser::$ot must not be accessed before initialization

According to CoPilot, the issue is that with MW 1.43 there's a need to call startExternalParse when getting the Parser, so that $ot can be properly typed before use.

Patch follows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions