Skip to content

[19.0][OU-FIX] base: strip 19.0 RNG-removed search-view attrs#19

Draft
dnplkndll wants to merge 1 commit into
19.0from
19.0-fix-base-strip-search-view-removed-attrs
Draft

[19.0][OU-FIX] base: strip 19.0 RNG-removed search-view attrs#19
dnplkndll wants to merge 1 commit into
19.0from
19.0-fix-base-strip-search-view-removed-attrs

Conversation

@dnplkndll
Copy link
Copy Markdown

@dnplkndll dnplkndll commented May 22, 2026

Strip 19.0 RNG-removed attributes from stored 18.0 search-view arch_db:

  • expand= on <group> (groupby) and <field> (searchpanel)
  • string="Group By" on <group> (label is implicit in 19.0)

Without this, the first module update touching an affected view crashes:

ValidationError: Invalid view forum.post.view.search ...
ValueError: too many values to unpack — orm.models.ensure_one()

Non-mechanical adaptations

  • arch_db is jsonb (multi-lang) since 17.0 — iterate per language key via jsonb_each + jsonb_object_agg, regex on the unescaped value (#>> '{}'), rebuild.
  • Scoped to type='search'. <list expand=…> is still valid in 19.0 — broader scoping would brick it.
  • Lab Tier-1 seed (oca_18_enriched): 181 affected views → 0; downstream forum_post_view_search cliff cleared.

Test fixture in base/tests/ seeds an 18.0 view carrying both attr shapes and asserts post-migration removal.

@dnplkndll dnplkndll force-pushed the 19.0-fix-base-strip-search-view-removed-attrs branch from 1d36d6a to 9f74fb5 Compare May 22, 2026 21:34
@dnplkndll dnplkndll changed the base branch from ledoent to 19.0 May 22, 2026 22:01
@dnplkndll dnplkndll closed this May 22, 2026
@dnplkndll dnplkndll reopened this May 22, 2026
19.0's RelaxNG schema removes `expand=` on <group>/<field> and
`string="Group By"` on <group> in <search> views. Stored 18.0
arch_db carrying these attrs fails _check_xml on module upgrade,
leaving the view unrenderable and breaking xml_id lookups
downstream (e.g. website_forum.forum_post_view_search).

Strip the attrs in pre-migration via jsonb_each + regex_replace on
the multi-lang arch_db; module updates regenerate clean blobs from
the new source XML.
@dnplkndll dnplkndll force-pushed the 19.0-fix-base-strip-search-view-removed-attrs branch from 9f74fb5 to 7b2fc99 Compare May 22, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant