An error appears on the settings form page:
The website encountered an unexpected error. Try again later.
TypeError: Drupal\trash\Form\TrashSettingsForm::Drupal\trash\Form\{closure}(): Return value must be of type string, Drupal\Core\StringTranslation\TranslatableMarkup returned in Drupal\trash\Form\TrashSettingsForm->Drupal\trash\Form\{closure}() (line 112 of modules/contrib/trash/src/Form/TrashSettingsForm.php).
array_map() (Line: 111)
Drupal\trash\Form\TrashSettingsForm->buildForm()
call_user_func_array() (Line: 528)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 279)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->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: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)
To reproduce this, need to enable Group module and to have at least one group created.
PR above enables the module to work with block_content entity type.
In order to test if it works properly there are testing steps:
1) go to admin/config/content/trash settings page. Content block
option should be available.
2) check Content block
option, block bundles should appear.
3) enable Content block
entity and save configurations.
4) At this point, trash module should add a new column deleted
to the block_content_field_data
table. Check this by running drush sqlq "describe block_content_field_data;"
command
5) In drupal go to admin/content/block and try to delete some block. The confirmation message should say that it will be moved to the trash bin.
6) After the block is removed, go to admin/content/trash/block_content page and check if this removed block appeared in the trash bin.