fix: #3636517 Keep the English block component versions so a non-English install does not stop

Follow-up for #3636517: installing The Rightup in a language other than English can stop with an InvalidConfigException on a Canvas block component version.

Problem

Canvas makes a component for each block as soon as the block exists, and the component's version is a hash that includes the block's label, translated into the install language. Several labels are translatable ("Breadcrumbs", "Site branding", "Exposed form: @view-@display_id", "@view: @display").

When Canvas makes one of those components before the recipe runs, a Portuguese install gets, for example, 3d1fe7fe5816c768 for the breadcrumb block instead of the 0d7e961dd03aa710 the recipe pins. The recipe's own copy of the component is skipped because the component already exists, and the first config action that pins the English version fails validation.

Whether that happens depends on when Canvas generated the component, so it shows up on different actions on different runs:

  • canvas.content_template.node.podcast.full, on block.system_breadcrumb_block (reproduced here)
  • canvas.page_region.vartheme_bs5_rightup.header, on block.views_exposed_filter_block.search-header_search (the reported error, reproduced here)

Fix

recipe.yml keeps the English version of each pinned block component whose label is translated, as an older version beside whatever Canvas made (simpleConfigUpdate on versioned_properties.<hash>). The pinned versions then exist in every language, and Canvas renders the version that is pinned. English installs keep the same active versions.

Testing

Browser installer, Portuguese (Portugal), on a stock drupal/cms with 1.0.8:

  • As released: stops on canvas.content_template.node.podcast.full (breadcrumb version).
  • With this change: installs. That run had Canvas make the breadcrumb, branding and header search components in Portuguese first, and all pinned versions resolved.

On 1.0.x with this change: Portuguese install (drush) and English install (browser installer) finish, home page and news, podcast and episode pages return 200, and the header search renders. Replaying the header actions after Canvas made the component in Portuguese gives the reported error without this change and none with it.

AI-Generated: Yes

Checkpoints:

  • File an issue
  • Addition/Change/Update/Fix
  • Testing to ensure no regression
  • Automated unit testing coverage
  • Automated functional testing coverage
  • UX/UI designer responsibilities
  • Readability
  • Accessibility
  • Performance
  • Security
  • Developer Documentation
  • User Guide Documentation
  • Reviewed by human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Release notes snippet
  • Release
Edited by Rajab Natshah

Merge request reports

Loading
Loading