Describe the bug
Get-all-urls not working,
$element Class is a string not an type of elementInterface in https://github.com/nystudio107/craft-routemap/blob/develop-v4/src/services/Routes.php#L467
The string contains 'craft/elements/Address'
"name":"Exception","message":"nystudio107\\routemap\\services\\Routes::getElementQuery(): Argument #1 ($elementType) must be of type craft\\base\\ElementInterface, string given, called in /Users/site/vendor/nystudio107/craft-routemap/src/services/Routes.php on line 469","code":0,"type":"TypeError","file":"/Users/site/vendor/nystudio107/craft-routemap/src/services/Routes.php","line":616,"stack-trace":["#0 /Users/site/vendor/nystudio107/craft-routemap/src/services/Routes.php(469): nystudio107\\routemap\\services\\Routes->getElementQuery('craft\\\\elements\\\\...', Array)","#1 [internal function]: nystudio107\\routemap\\services\\Routes->nystudio107\\routemap\\services\\{closure}(Object(craft\\cache\\FileCache))","#2 /Users/site/vendor/yiisoft/yii2/caching/Cache.php(607): call_user_func(Object(Closure), Object(craft\\cache\\FileCache))","#3 /Users/site/vendor/nystudio107/craft-routemap/src/services/Routes.php(459): yii\\caching\\Cache->getOrSet('ElementUrls130a...', Object(Closure), 30, Object(yii\\caching\\TagDependency))","#4 /Users/site/vendor/nystudio107/craft-routemap/src/services/Routes.php(113): nystudio107\\routemap\\services\\Routes->getElementUrls('craft\\\\elements\\\\...', Array, NULL)","#5 /Users/site/vendor/nystudio107/craft-routemap/src/controllers/RoutesController.php(49): nystudio107\\routemap\\services\\Routes->getAllUrls(Array, NULL)","#6 [internal function]: nystudio107\\routemap\\controllers\\RoutesController->actionGetAllUrls(Array, NULL)","#7 /Users/site/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)","#8 /Users/site/vendor/yiisoft/yii2/base/Controller.php(178): yii\\base\\InlineAction->runWithParams(Array)","#9 /Users/site/vendor/yiisoft/yii2/base/Module.php(552): yii\\base\\Controller->runAction('get-all-urls', Array)","#10 /Users/site/vendor/craftcms/cms/src/web/Application.php(301): yii\\base\\Module->runAction('route-map/route...', Array)","#11 /Users/site/vendor/craftcms/cms/src/web/Application.php(625): craft\\web\\Application->runAction('route-map/route...', Array)","#12 /Users/site/vendor/craftcms/cms/src/web/Application.php(280): craft\\web\\Application->_processActionRequest(Object(craft\\web\\Request))","#13 /Users/site/vendor/yiisoft/yii2/base/Application.php(384): craft\\web\\Application->handleRequest(Object(craft\\web\\Request))","#14 /Users/site/web/index.php(12): yii\\base\\Application->run()","#15 /Users/toni/.composer/vendor/laravel/valet/server.php(234): require('/Users/toni/Sit...')","#16 {main}"]}
To reproduce
Steps to reproduce the behaviour:
- Go to actions/route-map/routes/get-all-urls (with Craft 4, 4.0.0-beta-2)
- See error message
Expected behaviour
Showing all public urls.
Versions
- Plugin version: 4.0.0-beta-2
- Craft version: 4.1.0.2
bug