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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 14 2018, 7:21 PM

@Yaron_Koren FYI since I am not sure if you see this.

@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?

You can do that, or download the code here (select the "master" version):

https://www.mediawiki.org/wiki/Special:ExtensionDistributor/ExternalData

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 closed this task as Resolved.Jul 19 2018, 7:40 PM
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.

Ciencia_Al_Poder reopened this task as Open.Jul 23 2018, 9:28 AM

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

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.

DeepBlue closed this task as Resolved.Aug 16 2018, 6:13 PM

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