Views text area plugin does not declare a dependency on the text format it uses

Created on 21 October 2017, over 7 years ago
Updated 22 March 2025, 14 days ago

Problem/Motivation

This was uncovered by #2916898: Do not use basic_html text format for 'No log messages available.' message β†’ .

If you add a custom text with a text format to a views area (for example the empty text of many views), the view will not have a dependency on that text format, so that it will break when that text format is missing.

Proposed resolution

Add a dependency on the text format.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component

views.module

Created by

πŸ‡©πŸ‡ͺGermany tstoeckler Essen, Germany

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.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

  • First commit to issue fork.
  • Merge request !11568Views text area format dependency β†’ (Open) created by dcam
  • Pipeline finished with Failed
    14 days ago
    Total: 153s
    #454678
  • Pipeline finished with Failed
    14 days ago
    Total: 411s
    #454681
  • Pipeline finished with Failed
    14 days ago
    Total: 686s
    #454688
  • Pipeline finished with Failed
    14 days ago
    Total: 588s
    #455117
  • Pipeline finished with Failed
    14 days ago
    Total: 269s
    #455134
  • Pipeline finished with Success
    14 days ago
    Total: 599s
    #455141
  • Pipeline finished with Failed
    14 days ago
    Total: 299s
    #455182
  • Pipeline finished with Failed
    13 days ago
    Total: 367s
    #455196
  • Pipeline finished with Failed
    13 days ago
    Total: 410s
    #455200
  • Pipeline finished with Canceled
    12 days ago
    Total: 192s
    #455738
  • Pipeline finished with Failed
    12 days ago
    Total: 672s
    #455741
  • Pipeline finished with Success
    12 days ago
    Total: 777s
    #455778
  • πŸ‡ΊπŸ‡ΈUnited States dcam

    I converted the patch in #2 to an MR. Then I fixed it because the return value from calculateDependencies() was incorrect. I added a test. At some point I realized that this needed an update path. So I wrote that and added a test for it too.

    I did not address the question in #13. I wasn't sure if it's necessary since plugins are @internal.

  • πŸ‡¬πŸ‡§United Kingdom MrDaleSmith

    Change applies cleanly, test pass and the correct dependency is now added to the exported config. I think this is OK to go.

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

    Probably need to update any default views that ship with core to include these. Example views.view.frontpage.yml in node, there may be others.

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

    Results of grep -rn "plugin_id: text$" --include views.view.*.yml:

    core/profiles/demo_umami/config/install/views.view.frontpage.yml:303:          plugin_id: text
    core/profiles/demo_umami/config/install/views.view.frontpage.yml:373:          plugin_id: text
    core/modules/content_translation/tests/modules/content_translation_test_views/test_views/views.view.test_entity_translations_link.yml:104:          plugin_id: text
    core/modules/views/tests/fixtures/update/views.view.test_filter_format_dependencies.yml:164:          plugin_id: text
    core/modules/views/tests/fixtures/update/views.view.test_entity_id_argument_update.yml:193:          plugin_id: text
    core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_empty.yml:34:          plugin_id: text
    core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_empty.yml:40:          plugin_id: text
    core/modules/views/tests/modules/views_test_config/test_views/views.view.test_entity_id_argument.yml:160:          plugin_id: text
    core/modules/views/tests/modules/views_test_config/test_views/views.view.test_tokens.yml:109:          plugin_id: text
    core/modules/views/tests/modules/views_test_config/test_views/views.view.test_tokens.yml:141:          plugin_id: text
    core/modules/views/tests/modules/views_test_config/test_views/views.view.test_destroy.yml:50:          plugin_id: text
    core/modules/views/tests/modules/views_test_config/test_views/views.view.test_destroy.yml:56:          plugin_id: text
    core/modules/views/tests/modules/views_test_config/test_views/views.view.test_destroy.yml:148:          plugin_id: text
    core/modules/views/tests/modules/views_test_config/test_views/views.view.test_destroy.yml:154:          plugin_id: text
    core/modules/views/tests/modules/views_test_config/test_views/views.view.test_destroy.yml:161:          plugin_id: text
    core/modules/views/tests/modules/views_test_config/test_views/views.view.test_destroy.yml:167:          plugin_id: text
    core/modules/views/tests/modules/views_test_config/test_views/views.view.test_token_view.yml:205:          plugin_id: text
    core/modules/views_ui/tests/modules/views_ui_test/config/install/views.view.sa_contrib_2013_035.yml:178:          plugin_id: text
    
  • Pipeline finished with Success
    9 days ago
    Total: 593s
    #459094
  • πŸ‡ΊπŸ‡ΈUnited States dcam

    Not all of those views specified the content of the text, so there was nothing to update in those cases. But I updated the ones that needed a dependency.

Production build 0.71.5 2024