Page MenuHomePhabricator

DynamicPageList uncaught exception PHP fatal error
Open, Needs TriagePublic


Version: 1.30 RC

DynamicPageList is giving a PHP fatal error, causing the site to give a HTTP 500.

PHP Fatal error:  Uncaught exception 'UnexpectedValueException' with message 'callback 'DynamicPageListHooks::onRegistration' is not callable' in /srv/mediawiki/w/includes/registration/ExtensionRegistry.php:339

The repo is "intersection"

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 1 2017, 4:48 PM
This comment was removed by Reception123.
Reception123 updated the task description. (Show Details)Dec 1 2017, 5:10 PM
Reception123 added a subscriber: Zppix.

Is there a stacktrace for this?

Reception123 added a comment.EditedDec 1 2017, 8:02 PM

@Addshore backtrace:

[01-Dec-2017 20:02:21 UTC] PHP Fatal error:  Uncaught exception 'UnexpectedValueException' with message 'callback 'DynamicPageListHooks::onRegistration' is not callable' in /srv/mediawiki/w/includes/registration/ExtensionRegistry.php:339
Stack trace:
#0 /srv/mediawiki/w/includes/registration/ExtensionRegistry.php(149): ExtensionRegistry->exportExtractedData(Array)
#1 /srv/mediawiki/w/includes/Setup.php(40): ExtensionRegistry->loadFromQueue()
#2 /srv/mediawiki/w/includes/WebStart.php(114): require_once('/srv/mediawiki/...')
#3 /srv/mediawiki/w/index.php(40): require('/srv/mediawiki/...')
#4 {main}
  thrown in /srv/mediawiki/w/includes/registration/ExtensionRegistry.php on line 339

We have been using wfLoad before (with 1.29) so there must be a new change which has provoked this error.

Ahh the Intersection extension (with the internal name DynamicPageList )

Exactly which repo are you checking code out from?
Are you definately on REL1_30?

REL1_30 from gerrit has no reference to DynamicPageListHooks::onRegistration
1.29 .28 etc also do not.

It looks like other versions of this extension do however
And they also have the method implemented

I found on gerrit.

DynamicPageList @ 9acf000
DynamicPageList3 @ 92c3965

It looks like you are also loading this 3 repo

That points to and

Where you have a callback registered
And a method correctly placed

However the classes for both DynamicPageList and DynamicPageList3 both have the same names are are not namespaced.
As a result the first class with a given name will be loaded.

When you call wfLoadExtension for DynamicPageList3, it gets the DynamicPageListHooks class from DynamicPageList which does not have the method.
I don't recommend loading both of these extensions on the same wiki. These extensions should probably all be namespaced or have their classes renamed.

Alexia added a subscriber: Alexia.Dec 2 2017, 2:52 PM

You should not be running both of these extensions at the same time. Intersection is a legacy extension and fork/branch of the previous iterations of DPL.

@Alexia Well we are a wiki farm, so they are ran on different wikis, but I was testing them on a testwiki. If possible, it would still be nice if they could be namespaced.

Alexia added a comment.Dec 2 2017, 3:12 PM

@Reception123 DPL3 is meant to replace all previous iterations of DPL.