Page MenuHomePhabricator

Undefined variable: mappings in extensions/ExternalData/ED_ParserFunctions.php on line 535
Closed, ResolvedPublic

Description

When creating a new website page on Wikiapiary, right after saving, I got this messages at the very top of the page:

Notice: Undefined variable: mappings in /srv/www/mediawiki/public_html/w/extensions/ExternalData/ED_ParserFunctions.php on line 535
Warning: Invalid argument supplied for foreach() in /srv/www/mediawiki/public_html/w/extensions/ExternalData/ED_ParserFunctions.php on line 535

If I reload the page I don't get them again.

Event Timeline

@Kghbln - thanks; no, I didn't see it before.

@Ciencia_Al_Poder - there have been a bunch of changes to the ED code; I would recommend upgrading to the latest code. (And that also reminds me that I need to release a new version of ED - it's well overdue.)

Vvjjkkii renamed this task from Undefined variable: mappings in extensions/ExternalData/ED_ParserFunctions.php on line 535 to uzaaaaaaaa.Jul 1 2018, 1:03 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from uzaaaaaaaa to Undefined variable: mappings in extensions/ExternalData/ED_ParserFunctions.php on line 535.Jul 2 2018, 6:36 AM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.

@Samwilson - I still think it might be just a matter of them needing to upgrade External Data to the latest code...

Currently we are running version 1.8.3 of ExternalData. Is there a more recent version of this extension that I should be aware of?

No, but there have been a lot of changes since 1.8.3 was released (two years ago!). You should just get the latest code, if possible. That reminds me again that I need to release a new version of ED.

No, but there have been a lot of changes since 1.8.3 was released (two years ago!). You should just get the latest code, if possible. That reminds me again that I need to release a new version of ED.

Where is that code?

I think I'm just missing something here. Should I be cloning it from git?

Thanks. This fix is implemented and I will see if this fixes the problem. Being an intermittent issue, please give me a heads up if you see the error.

Looks good!

It wasn't intermittent for me: just on a normal page view it'd only happen if the page was not cached.

DeepBlue claimed this task.

This error no longer appears to be an issue as I have cleared the cache of multiple pages during testing of stat graphs and never encountered this.

The issue hasn't been resolved. I've just created a new page and the error appears again at the top of the page:

imagen.png (364×1 px, 43 KB)

Notice: Undefined variable: mappings in /srv/www/mediawiki/public_html/w/extensions/ExternalData/includes/ED_ParserFunctions.php on line 540
Warning: Invalid argument supplied for foreach() in /srv/www/mediawiki/public_html/w/extensions/ExternalData/includes/ED_ParserFunctions.php on line 540

However, it only appears right after creating the page. If I reload the page the error is not displayed.

The line number is now different, though.

Hmm...interesting. Will see what I can do.

We now check if the variable mappings is set before running the snippet of code on 540. This should resolve this problem.