New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocumentationParserFunction fails with "Undefined index: language" #1328

Closed
kghbln opened this Issue Dec 19, 2015 · 7 comments

Comments

Projects
None yet
3 participants
@kghbln
Member

kghbln commented Dec 19, 2015

  • MW: 1.25.3
  • SMW: 2.3.0
  • SESP: 1.3.1
  • PHP: 5.6.11
  • SQL: 5.6.27
PHP Notice:  Undefined index: language in /.../w/extensions/SemanticMediaWiki/includes/parserhooks/DocumentationParserFunction.php on line 40
PHP Fatal error:  Call to a member function getValue() on null in /.../w/extensions/SemanticMediaWiki/includes/parserhooks/DocumentationParserFunction.php on line 40

This issue somehow sounds familiar to me. This happened when trying to run "refreshLinks.php".

@mwjames

This comment has been minimized.

Contributor

mwjames commented Dec 19, 2015

This happened when trying to run "refreshLinks.php".

Can you find out on which page or template this is happening?

Try adding to [0]

        if ( !isset( $parameters['language'] ) ) {
            throw new \Exception( "Karsten is angry with " . $parser->getTitle()->getPrefixedDBKey() );
        }

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/2.3.x/includes/parserhooks/DocumentationParserFunction.php#L39-L40

@mwjames

This comment has been minimized.

Contributor

mwjames commented Mar 12, 2016

Anyway can we figure out the root cause of the issue?

@kghbln

This comment has been minimized.

Member

kghbln commented Mar 30, 2016

Anyway can we figure out the root cause of the issue?

Now we found out. I am sorry for not seeing the post up till now.

Refs: Help:Incoing_format

So #smwdoc is the transgressing entity.

Step to mitigate for the time being: Comment out #smwdoc

@mwjames mwjames changed the title from Undefined index: language to DocumentationParserFunction fails with "Undefined index: language" Mar 30, 2016

@mwjames mwjames added the bug label Mar 30, 2016

@JeroenDeDauw

This comment has been minimized.

Member

JeroenDeDauw commented Mar 30, 2016

I checked the code and am not seeing what is wrong. There is a language parameter definition and it has a default value, so it should always be there.

@JeroenDeDauw

This comment has been minimized.

Member

JeroenDeDauw commented Mar 30, 2016

I'm guessing the processing is failing for some reason (which is fine). The code is currently assuming this does not happen (which is not fine). I created a task for fixing this: #1485

@kghbln

This comment has been minimized.

Member

kghbln commented Jul 9, 2016

We still get this one:

Processing all IDs from 4673 to 40901 ...
PHP Notice: Undefined index: language in /.../w/extensions/SemanticMediaWiki/src/ParserFunctions/DocumentationParserFunction.php on line 40
PHP Fatal error: Call to a member function getValue() on null in /.../w/extensions/SemanticMediaWiki/src/ParserFunctions/DocumentationParserFunction.php on line 40

@kghbln

This comment has been minimized.

Member

kghbln commented Jul 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment