Skip to content

fix: exclude supertype extend mixins from fieldset processing to prev…#2410

Open
pvollenweider wants to merge 1 commit into
Jahia:mainfrom
pvollenweider:fix/extend-mixin-supertype-dedup
Open

fix: exclude supertype extend mixins from fieldset processing to prev…#2410
pvollenweider wants to merge 1 commit into
Jahia:mainfrom
pvollenweider:fix/extend-mixin-supertype-dedup

Conversation

@pvollenweider

@pvollenweider pvollenweider commented Jun 11, 2026

Copy link
Copy Markdown
Member

Description

When two mixins both declare extends = jnt:page (or any shared target type) and one is a supertype of the other, getExtendMixins() returns both. Because the underlying collection iterates over a HashMap, processing order is non-deterministic. Depending on which mixin is processed first, findAndRemoveField() during fieldset merge moves properties from the correct activated fieldset into an inactive one, causing fields to silently disappear from the Content Editor form.

Fix: after collecting the extend mixin list, filter out any entry that is a supertype of another entry in the same list. The more specific mixin already carries all supertype properties via inheritance, so the supertype entry is redundant.

Discovered while investigating a customer case (ARKEMA-1813) where akmmix:sampleCartPage > jmix:templateMixin, akmmix:sampleCartHeader — both having extends = jnt:page — caused title and description from akmmix:sampleCartHeader to intermittently not appear in Content Editor after the addMixin mechanism applied akmmix:sampleCartPage.

Checklist

Source code

  • I've shared and documented any breaking change
  • I've reviewed and updated the jahia-depends

Tests

  • I've provided Unit and/or Integration Tests
  • I've updated the parent issue with required manual validations

Manual validation: define two mixins where one extends the other and both have extends = jnt:page. Map the more specific mixin via addMixin. Create a page using that template and confirm all inherited properties appear in Content Editor consistently across multiple attempts.

@pvollenweider pvollenweider requested a review from a team June 11, 2026 14:05
@github-actions

Copy link
Copy Markdown

🦜 Chachalog

No changelog entries detected. Learn more about Chachalog.

Create a new entry online or run npx chachalog@0.5.2 prompt to create a new entry locally.

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.

addMixin fieldset properties non-deterministically assigned when two mixins share the same extends target

1 participant