I was trying to use the lua functions, and, no matter what parameters I tried, I got the same error message:
Exception caught: DpleFeatureResults::toFullpagenames(): Argument #1 ($result) must be of type ResultWrapper, Wikimedia\Rdbms\MysqliResultWrapper given, called in /var/www/mediawiki/extensions/DynamicPageListEngine/includes/DynamicPageListEngine.php on line 125
(I got variations of this error for `getFullpagenames`, `getPagenames`, and `getPages`.)
I was able to fix the error (I think!) by changing the argument type to MysqliResultWrapper in the /include/DpleFeatureResults.php file (replaced all in the file, and had to import using `use Wikimedia\Rdbms\MysqliResultWrapper`), but I didn't want to push too far since I don't know what the downstream effects of that kind of change would be. By making the change, I did not get the error. The results of my lua script were still not correct, but that's probably an issue with my lua, not with DPLE ;)
MediaWiki version 1.42
DPLE version 1.1.0-rc1 (1545ff3) 02:09, 2 November 2024
sample lua:
function p.getPages(titletext)
local pages = mw.ext.dpl.getFullpagenames{
namespace = 0,
titleprefix = titletext
}
end