Skip to content

Fix control-panel property widgets hidden by pat-autotoc (#154) - #155

Merged
erral merged 1 commit into
mainfrom
fix-controlpanel-property-widgets
Jun 30, 2026
Merged

erral merged 1 commit into
mainfrom
fix-controlpanel-property-widgets

Conversation

@jensens

@jensens jensens commented Jun 29, 2026

Copy link
Copy Markdown
Member

Fixes #154.

Problem

After upgrading to 2.0.0rc1, the user/group property-mapping widgets are missing from the Plone control panel (they are present in the ZMI, and the data is intact).

Root cause

See the detailed analysis in #154. In short:

  • The dict/array widgets render correct server-side HTML, but yafowil.widget.dict 2.0 wraps itself in a nested, legend-less <fieldset>.
  • The new UX added pat-autotoc with section: fieldset, which turns every <fieldset> into a tab section — including those nested widget fieldsets — so they get hidden in the browser.
  • The ZMI works because it has no pat-autotoc.

Fix

Scope the auto-TOC tabbing to the top-level section fieldsets only (server/users/groups/cache all carry class: formPanel):

-        pat-autotoc: "levels: legend; section: fieldset; className: autotabs"
+        pat-autotoc: "levels: legend; section: fieldset.formPanel; className: autotabs"

The nested widget fieldsets no longer match the section selector.

⚠️ Verification

This is a browser-side fix — the server-side HTML was already correct, so the existing Python/unit tests can't reproduce or prove it (they stay green either way). Please verify in a browser on an affected instance (the control panel should again show the User attribute aliases, User Property-Sheet Attributes, and the group equivalents). 240 unit/integration/doctest tests still pass.

Follow-up (not in this PR)

The form has both enableFormTabbing and pat-autotoc active — two tabbing mechanisms on the same form. Worth revisiting whether both are intended.

🤖 Generated with Claude Code

The new control-panel UX added pat-autotoc with 'section: fieldset',
which treats every <fieldset> as a tab section. yafowil.widget.dict /
.array (2.0) wrap themselves in a nested, legend-less <fieldset>, so the
user/group property-mapping widgets were turned into empty autotoc
sections and hidden in the Plone control panel (the ZMI, which has no
pat-autotoc, still showed them).

Scope the tabbing to the top-level 'fieldset.formPanel' sections
(server/users/groups/cache) so the nested widget fieldsets are left
alone.

Fixes #154.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@erral
erral self-requested a review June 30, 2026 06:13

@erral erral left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With these changes the issue is resolved.

Users

image

Groups

image

@erral
erral merged commit 4ef46f5 into main Jun 30, 2026
7 checks passed
@erral
erral deleted the fix-controlpanel-property-widgets branch June 30, 2026 06:19
@jensens

jensens commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

@erral: What do you think, is it now 2.0.0 final ready or wait for more feedback?

@erral

erral commented Jun 30, 2026

Copy link
Copy Markdown
Member

@jensens AFAICT and with the tests I have done in a client's site which uses this plugin with Active Directory, it works perfectly and a new version can be released.

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.

User and group property configuration not available through Plone

2 participants