Topic on Extension talk:PageImages

PHP Warning after upgrading to MediaWiki 1.28.0

11
Summary by Till Kraemer

Adding $wgPageImagesNamespaces = array(0); to LocalSettings.php and running PageImages/maintenance/initImageData.php fixes the problem.

Till Kraemer (talkcontribs)

I just upgraded to MediaWiki 1.28.0 and now I'm getting the following warning:

PHP Warning:  array_flip() expects parameter 1 to be array, integer given in /path/to/wiki/extensions/PageImages/includes/ParserFileProcessingHookHandlers.php on line 121

Also, images of new articles don't show up in the popups anymore. Any help is more than welcome! Thanks and cheers!

Kghbln (talkcontribs)

I suspect that you did not upgrade PageImages to REL1_28. Apart from that I cannot tell.

Till Kraemer (talkcontribs)

@Kghbln, thanks for your reply. I did upgrade PageImages. The version file looks like this:

PageImages: REL1_28
2016-11-18T19:12:50
f3534cf

I'm running PHP 7.0.8. Thanks and cheers!

Kghbln (talkcontribs)

In 90 % of the cases upgrading is the issue. Now I'd recommend to report this at phabricator to make developers aware of it.

Till Kraemer (talkcontribs)

@Kghbln, thanks for your suggestion! I thought only developers have permission to post there, but it looks like I can do that too! :) Cheers!

Kghbln (talkcontribs)

Yeah, everybody may. :) Ah, I see you run on OpenBSD. Really liked this one though I was too inexperienced at the time to continue with it.

Octfx (talkcontribs)

I am having the same problem, except that no image is shown

NH35 (talkcontribs)

Also the same error here :)

Till Kraemer (talkcontribs)

$wgPageImagesNamespaces wasn't set here. Setting it to $wgPageImagesNamespaces = array(0); in LocalSettings.php fixed it for me. The warnings are gone and all images show up now.

@Kghbln, yeah, I love OpenBSD and Theo de Raadt's views on technology. Give it another shot sometime! :)

Thanks and cheers!

Octfx (talkcontribs)

In addition to adding the

$wgPageImagesNamespaces = array(0);

var, try running the PageImages maintenance script.

PageImages/maintenance/initImageData.php

. This fixed it for me.

Kghbln (talkcontribs)

Great collaboration. So the docu just needs to be updated.