Extension talk:DynamicPageListEngine

About this board

Fix for PHP 8.1 (TypeError)

GSSNYC (talkcontribs)

In PHP 8.1, there is a TypeError when calling mw.ext.dpl.getPages on account of lines 91 and 104 in /includes/DpleFeatureNamespace.php - the use of PHP's `count` causes an exception if namespace is not provided (or if notNamespaces is not provided) because it attempts to call count on null. This can easily be fixed with PHP 7.0's null-coalescing operator ('??'), or alternatively to support older versions you can just use a ternary to check if the array is null and replace with an empty array before calling count.

(Another option might be to wrap the switch cases in an if statement.)

I would submit a patch for this myself but unfortunately I do not have experience with MediaWiki's/Gerrit submission process and don't immediately have the time to work out how to do it.

GSSNYC (talkcontribs)

The same applies to /includes/DpleFeatureExtra.php, line 85.

GSSNYC (talkcontribs)

...and /includes/DpleFeatureExtrax.php, line 83.

RV1971 (talkcontribs)

Thanks for spotting this. Fix has been uploaded to Gerrit for review.

Reply to "Fix for PHP 8.1 (TypeError)"

Need more information on usage

2 (talkcontribs)

The Special:Version page shows that it has been installed, and I have included it in LocalSettings.php. But when I try to use the tag <DPL> or <DPLE> or any sort of combination of those names written out with the parameters enabled as default, it doesn't actually turn into a list and only has the tags written out like plain text.

I've installed this on a fresh mediawiki install and this is my first time using it, so any obvious pointers would help.

RV1971 (talkcontribs)

DPLE does not add syntax tags. It is a backend that can be accessed via Lua only, you need to write your own modules to use it.

Reply to "Need more information on usage"

DynamicPageListEngine.php is absent

Sphynkx (talkcontribs)

In version for MW1.32 the DynamicPageListEngine.php is absent.

Install recommendations get wiki-engine to fall.

If take DynamicPageListEngine.php from some previous version (I had 0.2), the engine will work, but there is uncertainty is ext works correctly..

RV1971 (talkcontribs)

I'm afraid the installation instructions were outdated. Thanks for spotting this, I have just fixed them.

Reply to "DynamicPageListEngine.php is absent"

How to get this extension to work?

Zewas (talkcontribs)

I downloaded DataTable2 from Sourceforge, installed it with

   require_once "$IP/extensions/DataTable2/DataTable2.php";

and... nothing. The LUA console tells me:

   Lua error in console ... attempt to index field 'dpl' (a nil value).

This is what I had typed in:

   =mw.ext.dpl.getPagenames{ namespace = 14, text = 'Traversal' }

Is there anything else I need to do? Is DataTable2 even the same extension as DynamicPageListEngine?

RV1971 (talkcontribs)

I'm afraid the sourceforge storage is confusing. For some years I had absolutely no time to reorganize this even though I continued developing the extension. Today I have requested the creation of a gerrit repo, so a download via the modern MediaWiki facilities will hopefully be available soon.

Zewas (talkcontribs)

Well, I had to disable the extension altogether because it created mysterious database errors on non-module pages...

Reply to "How to get this extension to work?"
Louperivois (talkcontribs)

Im getting PHP warnings just because of some whitespaces at the end of DynamicPageListEngine.php. Just remove these whitespaces or the endtag to solve the problem.

Reply to "PHP warnings"
There are no older topics
Return to "DynamicPageListEngine" page.