Skip to content

Log MetaModel item changes with their rendered label, not table+id - #1589

Merged
zonky2 merged 1 commit into
release/2.5from
feature/systemlog
Sep 1, 2026
Merged

Log MetaModel item changes with their rendered label, not table+id#1589
zonky2 merged 1 commit into
release/2.5from
feature/systemlog

Conversation

@zonky2

@zonky2 zonky2 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Adds a MetaModels-specific system log listener alongside dc-general's new generic one (create/duplicate/delete, see the accompanying dc-general change): LogPersistedItemsListener names an item the same way its edit mask headline and breadcrumb already do, through ItemLabelRenderer and the input screen's "subheadline" pattern, falling back to the record id where none is configured - see ".claude/dcg-systemlog.md".

MetaModel items opt out of the generic listener (setLoggingEnabled(false) in DataProviderBuilder) so a change is not logged twice under two different wordings. The three configuration tables (render settings and friends) are unaffected and keep the generic wording, which is all that is meaningful for those.

New per-MetaModel checkbox "enableLogging" in tl_metamodel, default on.

Two bugs found while wiring this up and live-testing it, both fixed: method chaining in DataProviderBuilder lost the narrowed ContaoDataProviderInformation type psalm needed for setLoggingEnabled() because setVersioningEnabled()'s own interface declares the wider DataProviderInformationInterface as its return type; and the same "original model is never a literal null on create" pitfall the dc-general listener had, fixed the same way.

Adds a MetaModels-specific system log listener alongside dc-general's
new generic one (create/duplicate/delete, see the accompanying
dc-general change): LogPersistedItemsListener names an item the same
way its edit mask headline and breadcrumb already do, through
ItemLabelRenderer and the input screen's "subheadline" pattern,
falling back to the record id where none is configured - see
".claude/dcg-systemlog.md".

MetaModel items opt out of the generic listener (setLoggingEnabled(false)
in DataProviderBuilder) so a change is not logged twice under two
different wordings. The three configuration tables (render settings
and friends) are unaffected and keep the generic wording, which is all
that is meaningful for those.

New per-MetaModel checkbox "enableLogging" in tl_metamodel, default on.

Two bugs found while wiring this up and live-testing it, both fixed:
method chaining in DataProviderBuilder lost the narrowed
ContaoDataProviderInformation type psalm needed for setLoggingEnabled()
because setVersioningEnabled()'s own interface declares the wider
DataProviderInformationInterface as its return type; and the same
"original model is never a literal null on create" pitfall the
dc-general listener had, fixed the same way.
@zonky2 zonky2 self-assigned this Sep 1, 2026
@zonky2 zonky2 added this to the 2.5.x milestone Sep 1, 2026
@zonky2
zonky2 merged commit a38de06 into release/2.5 Sep 1, 2026
0 of 4 checks passed
@zonky2
zonky2 deleted the feature/systemlog branch September 1, 2026 14:12
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