Add web tests for module-specific block definitions cache invalidation

Created on 4 January 2013, over 12 years ago
Updated 26 August 2025, 24 days ago

Problem/Motivation

This is a followup issue for #1535868: Convert all blocks into plugins β†’ .

  • #1535868: Convert all blocks into plugins β†’ introduces caching for block plugin definitions, including derivative definitions provided based on module data.
  • The definitions cache is invalidated when, e.g., a menu is updated, so that the new menu block definitions can be loaded.
  • There is no test coverage ensuring that the cache is cleared appropriately in each case.

Proposed resolution

Add additional test coverage for the following blocks:

  1. AggregatorCategoryBlock
  2. AggregatorFeedBlock
  3. CustomBlock
  4. LanguageBlock
  5. MenuBlock
  6. SystemMenuBlock
  7. ViewsBlock
  8. ViewsExposedFilterBlock

For each, add a web test to check that the definitions are updated when the module data changes. E.g.:

  1. Add a menu.
  2. Visit the block library and confirm that a block derivative for that menu is listed.
  3. Programmatically confirm that the menu block definition is in the cache.
  4. Add a new menu.
  5. Confirm that the new menu block is listed on the block library.
  6. Update the new menu to change the block definition settings -- change the menu title.
  7. Confirm that the new menu title is used in the block library.
  8. Delete the new menu.
  9. Confirm that the new menu block is no longer listed on the block library.
πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

block.module

Created by

πŸ‡ΊπŸ‡ΈUnited States xjm

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024