Getting this error when trying to bulk update unaliased urls at /admin/config/search/path/update_bulk
The batch screen loads and dies after a while with this message. Suspecting some resource limit is hit, but still debugging.

Drupal 10.2.0
php 8.1

The only similar bug I found was this https://www.drupal.org/project/autoslave/issues/3280448

Possibly relate issue https://www.drupal.org/project/drupal/issues/2183565 My taxonomy is a large location taxonomy: continents -> countries -> cities

Drupal\pathauto\Form\PathautoBulkUpdateForm::batchProcessThe website encountered an unexpected error. Try again later.

TypeError: Symfony\Component\HttpFoundation\Session\Flash\FlashBag::peek(): Argument #1 ($type) must be of type string, array given, called in .../core/lib/Drupal/Core/Messenger/Messenger.php on line 59 in Symfony\Component\HttpFoundation\Session\Flash\FlashBag->peek() (line 62 of vendor/symfony/http-foundation/Session/Flash/FlashBag.php).
Drupal\Core\Messenger\Messenger->addMessage() (Line: 180)
Drupal\pathauto\Form\PathautoBulkUpdateForm::batchFinished() (Line: 457)
_batch_finished() (Line: 99)
_batch_page() (Line: 52)
Drupal\system\Controller\BatchController->batchPage()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)
CommentFileSizeAuthor
#10 3411478-10-pathauto-bulkupdate.patch839 bytesdeepak tomar

Issue fork pathauto-3411478

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

giorgio79 created an issue. See original summary.

giorgio79’s picture

Title: TypeError: Symfony\Component\HttpFoundation\Session\Flash\FlashBag::peek(): Argument #1 ($type) must be of type string, array given, called in /home/test/public_html/atms_test/core/lib/Drupal/Core/Messenger/Messenger.php on line 59 in Symfony\Component\Ht » TypeError: Symfony\Component\HttpFoundation\Session\Flash\FlashBag::peek(): Argument #1 ($type) must be of type string, array given, called in .../core/lib/Drupal/Core/Messenger/Messenger.php on line 59 in Symfony\Component\Ht
giorgio79’s picture

Issue summary: View changes
cilefen’s picture

Since pathauto is the code calling addMessage with bad parameters I suggest this issue should be moved to its queue.

giorgio79’s picture

Project: Drupal core » Pathauto
Version: 10.2.x-dev » 8.x-1.12
Component: batch system » Bulk generation

Moving to pathauto. thx @cliefen

cilefen’s picture

In the latest version of Pathauto, there is not a call to addMessage on line 180 but there is one on line 178.

sneha_surve’s picture

I am also facing same issue. Is there any patch for this?

berdir’s picture

The handling of a possible error is likely wrong in \Drupal\pathauto\Form\PathautoBulkUpdateForm::batchFinished(), multiple issues with it, that print_r() won't do anything useful and the error operation needs to be converted to a string too.

I'm not entirely sure how to even produce an error in a way that ends up there, but if you do, debug it and figure out how to display it.

cicciobat’s picture

Hi, have you found any solutions to this problem? Seems like the problem is in the $operations variable.

deepak tomar’s picture

Status: Active » Needs review
StatusFileSize
new839 bytes

Here is the patch to fix this issue.

berdir’s picture

Status: Needs review » Needs work

All contributions must be done using merge requests.

dhruv.mittal’s picture

Assigned: Unassigned » dhruv.mittal

dhruv.mittal’s picture

Assigned: dhruv.mittal » Unassigned
Status: Needs work » Needs review

  • berdir committed 1a946409 on 8.x-1.x authored by dhruv.mittal
    [#3411478] fix: TypeError: Symfony\Component\HttpFoundation\Session\...
berdir’s picture

Status: Needs review » Fixed

Merged.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.