Skip to content

Enable DC_General versioning for render settings, input screens, - #1592

Merged
zonky2 merged 2 commits into
release/2.5from
feature/versioning-builder-fix
Sep 1, 2026
Merged

Enable DC_General versioning for render settings, input screens,#1592
zonky2 merged 2 commits into
release/2.5from
feature/versioning-builder-fix

Conversation

@zonky2

@zonky2 zonky2 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

filter settings and MetaModel items

Turns on "enableVersioning" for tl_metamodel_dcasetting, tl_metamodel_rendersettings, tl_metamodel_filtersetting and the tl_metamodel_item base DCA every mm_* table inherits from - now reachable thanks to the accompanying dc-general fix.

Implements item-level versioning in MetaModels\DcGeneral\Data\Driver (saveVersion/getVersion/getVersions/setVersionActive/getActiveVersion), property-based rather than a raw row copy: it reuses the same Model::getProperty()/setProperty() path a normal edit already takes (through each attribute's valueToWidget()/widgetToValue()), so complex attributes (tags, table fields, ...) are covered without any attribute-specific code - see .claude/dcg-versionierung.md.

DataProviderBuilder::build() also hard-coded setVersioningEnabled(false) for MetaModels items specifically, mirroring the dc-general bug this change relies on being fixed. And Driver::sameModels() had an unrelated, pre-existing bug of its own: it compared both items' shared MetaModel instance instead of their values, which is always true and short-circuited the real per-attribute comparison below it - every save looked "unchanged" to storeVersion() after the first version, so no further versions were ever recorded.

filter settings and MetaModel items

Turns on "enableVersioning" for tl_metamodel_dcasetting,
tl_metamodel_rendersettings, tl_metamodel_filtersetting and the
tl_metamodel_item base DCA every mm_* table inherits from - now
reachable thanks to the accompanying dc-general fix.

Implements item-level versioning in MetaModels\DcGeneral\Data\Driver
(saveVersion/getVersion/getVersions/setVersionActive/getActiveVersion),
property-based rather than a raw row copy: it reuses the same
Model::getProperty()/setProperty() path a normal edit already takes
(through each attribute's valueToWidget()/widgetToValue()), so complex
attributes (tags, table fields, ...) are covered without any
attribute-specific code - see .claude/dcg-versionierung.md.

DataProviderBuilder::build() also hard-coded setVersioningEnabled(false)
for MetaModels items specifically, mirroring the dc-general bug this
change relies on being fixed. And Driver::sameModels() had an
unrelated, pre-existing bug of its own: it compared both items' shared
MetaModel instance instead of their values, which is always true and
short-circuited the real per-attribute comparison below it - every
save looked "unchanged" to storeVersion() after the first version, so
no further versions were ever recorded.
@zonky2 zonky2 added this to the 2.5.x milestone Sep 1, 2026
@zonky2 zonky2 self-assigned this Sep 1, 2026
Resolves a conflict in DataProviderBuilder::build() between this
branch's DCA-driven setVersioningEnabled() and release/2.5's
setLoggingEnabled(false) (from the systemlog feature) - both are
independent and kept.
@zonky2
zonky2 merged commit 2eef9a0 into release/2.5 Sep 1, 2026
0 of 4 checks passed
@zonky2
zonky2 deleted the feature/versioning-builder-fix branch September 1, 2026 15:29
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