- ๐ท๐ดRomania claudiu.cristea Arad ๐ท๐ด
Where is the error in Entity Legal, please provide a patch.
- Status changed to Active
over 1 year ago 9:41am 15 September 2023 - ๐น๐ทTurkey orkut murat yฤฑlmaz Istanbul
Hello all,
I guess that, this is an error of Simple XML Sitemap module and I'm migrating the issue to its own list.
Best,
Orkut - ๐น๐ทTurkey orkut murat yฤฑlmaz Istanbul
I'm changing the title too. Because, the error message appears with webform module too, after the cron run.
$ drush cron [15-Sep-2023 12:26:50 Europe/Istanbul] TypeError: Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase::getEntityImageData(): Argument #1 ($entity) must be of type Drupal\Core\Entity\ContentEntityInterface, Drupal\webform\Entity\Webform given, called in /var/www/html/web/modules/contrib/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityMenuLinkContentUrlGenerator.php on line 216 in /var/www/html/web/modules/contrib/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php on line 269 #0 /var/www/html/web/modules/contrib/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityMenuLinkContentUrlGenerator.php(216): Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase->getEntityImageData() #1 /var/www/html/web/modules/contrib/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php(247): Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityMenuLinkContentUrlGenerator->processDataSet() #2 /var/www/html/web/modules/contrib/simple_sitemap/src/Queue/QueueWorker.php(360): Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase->generate() #3 /var/www/html/web/modules/contrib/simple_sitemap/src/Queue/QueueWorker.php(324): Drupal\simple_sitemap\Queue\QueueWorker->generateResultsFromElement() #4 /var/www/html/web/modules/contrib/simple_sitemap/src/Manager/Generator.php(174): Drupal\simple_sitemap\Queue\QueueWorker->generate() #5 /var/www/html/web/modules/contrib/simple_sitemap/simple_sitemap.module(74): Drupal\simple_sitemap\Manager\Generator->generate() #6 /var/www/html/web/core/lib/Drupal/Core/Cron.php(335): simple_sitemap_cron() #7 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(388): Drupal\Core\Cron->Drupal\Core\{closure}() #8 /var/www/html/web/core/lib/Drupal/Core/Cron.php(318): Drupal\Core\Extension\ModuleHandler->invokeAllWith() #9 /var/www/html/web/core/lib/Drupal/Core/Cron.php(159): Drupal\Core\Cron->invokeCronHandlers() #10 /var/www/html/web/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run() #11 /var/www/html/vendor/drush/drush/src/Commands/core/DrupalCommands.php(63): Drupal\Core\ProxyClass\Cron->run() #12 [internal function]: Drush\Commands\core\DrupalCommands->cron() #13 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array() #14 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback() #15 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() #16 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process() #17 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute() #18 /var/www/html/vendor/symfony/console/Application.php(1081): Symfony\Component\Console\Command\Command->run() #19 /var/www/html/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand() #20 /var/www/html/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun() #21 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run() #22 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun() #23 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run() #24 /var/www/html/vendor/drush/drush/drush(4): require('...') #25 /var/www/html/vendor/bin/drush(119): include('...') #26 {main} TypeError: Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase::getEntityImageData(): Argument #1 ($entity) must be of type Drupal\Core\Entity\ContentEntityInterface, Drupal\webform\Entity\Webform given, called in /var/www/html/web/modules/contrib/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityMenuLinkContentUrlGenerator.php on line 216 in Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase->getEntityImageData() (line 269 of /var/www/html/web/modules/contrib/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php). [warning] Drush command terminated abnormally.
- Status changed to Postponed: needs info
over 1 year ago 9:52am 15 September 2023 - ๐น๐ทTurkey orkut murat yฤฑlmaz Istanbul
I have a webform link on my main navigation menu and I wanted to put my main navigation menu into my xml sitemap. On that webform, there is no image field. After reading the error message carefully, I decided to select "No" on "Include images" combobox and then, cron run succesfully.
@Christopher Riley, can you try it for your scenario too?
- Status changed to Active
12 months ago 4:06pm 5 January 2024 - ๐ฒ๐พMalaysia ckng
Updated from 4.1.4 => 4.1.8, visit /admin/config/search/simplesitemap/entities and the error message is thrown.
TypeError: Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase::__construct(): Argument #9 ($config_factory) must be of type Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\ConfigFactoryInterface, Drupal\Core\Config\ConfigFactory given, called in /var/www/html/web/modules/contrib/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/CustomUrlGenerator.php on line 92 in Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase->__construct() (line 105 of /var/www/html/web/modules/contrib/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php).
- ๐จ๐ฆCanada zhezhangrandy
@ckng
I have the same error when upgrading to 4.1.8
You may want to check if you are using any patch from
https://www.drupal.org/project/simple_sitemap/issues/3264573 โจ Respect front page configuration Closed: won't fixMine was caused by one of them
- ๐ฎ๐ณIndia abhisekmazumdar India
I also faced a similar issue. Rebuilding the queue and generating the site maps solved the problem.
- ๐ง๐ชBelgium gillesbailleux La Roche-en-Ardenne
Using simple_sitemap 4.1.8 on a D10.2.3 instance equipped with PHP 8.3.2, a similar error appears:
TypeError : Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase::getEntityImageData(): Argument #1 ($entity) must be of type Drupal\Core\Entity\ContentEntityInterface, Drupal\webform\Entity\Webform given, called in /home/dev-website/public_html/web/modules/contrib/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityMenuLinkContentUrlGenerator.php on line 232 in Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\EntityUrlGeneratorBase->getEntityImageData() (/home/dev-website/public_html/web/modules/contrib/simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php line 274)
- ๐ฎ๐ณIndia mohd sahzad
Mohd Sahzad โ made their first commit to this issueโs fork.
- last update
10 months ago 32 pass - Status changed to Needs review
10 months ago 11:38am 19 February 2024 - last update
10 months ago 5 pass, 1 fail - First commit to issue fork.
- last update
7 months ago PHPLint Failed - last update
7 months ago PHPLint Failed - last update
7 months ago PHPLint Failed - ๐ฎ๐ณIndia gg24
I have fixed some of the logic and refactored the code. There is still scope of refactorisation. Please review.
Thanks!
- Status changed to Fixed
3 months ago 5:25pm 24 September 2024 - ๐ท๐บRussia walkingdexter
Already fixed in ๐ Fix PHPStan errors Fixed , see this commit for details.
Automatically closed - issue fixed for 2 weeks with no activity.