Add support of block_content entity type

Created on 13 January 2025, 3 months ago

It would be great if the module could support block_content entity type.

✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada v1nk Vancouver

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @v1nk
  • Pipeline finished with Failed
    3 months ago
    Total: 228s
    #394198
  • πŸ‡¨πŸ‡¦Canada v1nk Vancouver

    v1nk β†’ changed the visibility of the branch 3.x to hidden.

  • πŸ‡¨πŸ‡¦Canada v1nk Vancouver

    v1nk β†’ changed the visibility of the branch 3.x to hidden.

  • Pipeline finished with Failed
    3 months ago
    Total: 1949s
    #394202
  • niharika.s β†’ made their first commit to this issue’s fork.

  • Pipeline finished with Failed
    3 months ago
    Total: 181s
    #394415
  • Pipeline finished with Failed
    3 months ago
    Total: 1083s
    #394836
  • Pipeline finished with Failed
    3 months ago
    Total: 230s
    #394852
  • First commit to issue fork.
  • πŸ‡¨πŸ‡¦Canada v1nk Vancouver

    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.

  • πŸ‡·πŸ‡΄Romania amateescu

    There's no mention in #11 about testing with Layout Builder and Workspaces, so I tested everything myself.

    Found and fixed one problem: when an entity using Layout Builder was purged, its inline blocks were only soft-deleted, basically leaving them around forever.

  • Pipeline finished with Skipped
    3 months ago
    #396000
  • πŸ‡·πŸ‡΄Romania amateescu

    Merged into 3.x.

  • πŸ‡¨πŸ‡¦Canada v1nk Vancouver

    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.

  • πŸ‡¨πŸ‡¦Canada v1nk Vancouver
  • Merge request !44Resolve #3499294 "Block content support" β†’ (Merged) created by v1nk
  • Pipeline finished with Success
    3 months ago
    Total: 178s
    #398371
  • Pipeline finished with Skipped
    3 months ago
    #398534
  • πŸ‡·πŸ‡΄Romania amateescu

    This could've been done in a new issue, but merged it here for expedience :) Thanks!

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

Production build 0.71.5 2024