Project

General

Profile

Actions

Bug #105578

open

Lost MM relations in workspaces

Added by Ruben Zielke 9 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2024-11-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Description

During the publishing process of related records the relations get lost.

Relations between two or more entities (e.g. products and references) are lost as soon as the products and the related references have an editing status in the editorial (non-live) workspace and are subsequently published.

See my TCA attached.

How to reproduce?

Initial situation

Products tx_solutions_domain_model_product
References tx_solutions_domain_model_reference
MM Table tx_solutions_domain_model_product_reference_mm

Products and references are linked via an MM table.
All data is in the live workspace

Products tx_solutions_domain_model_product
uid t3ver_oid t3ver_wsid t3ver_state
1 0 0 0
References tx_solutions_domain_model_reference.
uid t3ver_oid t3ver_wsid t3ver_state
1 0 0 0
2 0 0 0
Relation tx_solutions_domain_model_product_reference_mm
uid_local (product uid) uid_foreign (reference uid)
1 1
1 2

Editing reference

A reference (uid 1) is edited in the Editorial Workspace.
A copy with a new uid 3 of the data record is automatically created.
tx_solutions_domain_model_reference.t3ver_oid = 1
tx_solutions_domain_model_reference.t3ver_wsid = 1
tx_solutions_domain_model_reference.t3ver_state = 1

Products tx_solutions_domain_model_product
uid t3ver_oid t3ver_wsid t3ver_state
1 0 0 0
References tx_solutions_domain_model_reference.
uid t3ver_oid t3ver_wsid t3ver_state
1 0 0 0
2 0 0 0
3 1 1 1
Link tx_solutions_domain_model_product_reference_mm
uid_local (product uid) uid_foreign (reference uid)
1 1
1 2

Editing product

A product (uid 1) is edited in the Editorial Workspace.
A copy with a new uid 2 of the data record is automatically created.
tx_solutions_domain_model_product.t3ver_oid = 1
tx_solutions_domain_model_product.t3ver_wsid = 1
tx_solutions_domain_model_product.t3ver_state = 1

Products tx_solutions_domain_model_product
uid t3ver_oid t3ver_wsid t3ver_state
1 0 0 0
2 1 1 1
References tx_solutions_domain_model_reference.
uid t3ver_oid t3ver_wsid t3ver_state
1 0 0 0
2 0 0 0
3 1 1 1
Relation tx_solutions_domain_model_product_reference_mm
uid_local (product uid) uid_foreign (reference uid)
1 1
1 2
2 3

Publication of the product

The changes to the product are published.
The changes to the data record are transferred from 'uid 2' to 'uid 1'.
In the relation table, the additional entry (uid_local 5) is removed and the original entry uid_local 1 is updated with the uid 4 of the edited reference.
However, the reference uid 3 is not available in the live workspace.

Products tx_solutions_domain_model_product
uid t3ver_oid t3ver_wsid t3ver_state
1 0 0 0
2 1 1 1
References tx_solutions_domain_model_reference.
uid t3ver_oid t3ver_wsid t3ver_state
1 0 0 0
2 0 0 0
3 1 1 1
Relation tx_solutions_domain_model_product_reference_mm
uid_local (product uid) uid_foreign (reference uid)
1 3
1 2
1 3

Publication of the reference

The changes to the reference are published.
The changes to the data record are transferred from uid 3 to uid 1.
There is no change in the relation table.
However, the reference uid 3 is not available in the live workspace.

Products tx_solutions_domain_model_product
uid t3ver_oid t3ver_wsid t3ver_state
1 0 0 0
References tx_solutions_domain_model_reference.
uid t3ver_oid t3ver_wsid t3ver_state
1 0 0 0
2 0 0 0
3 1 1 1
Relation tx_solutions_domain_model_product_reference_mm
uid_local (product uid) uid_foreign (reference uid)
1 3
1 2

I would have expected the entry in the relation table to be updated when publishing the reference.

BTW: If a related record is edited in a non-live workspace, the stored relation is no more visible in the record view (backend). An editor has no information if the relation is really lost or not shown because of the workspace overlay.
May be it is an separate issue.

Please let me know if you need any further information.


Files

No data to display

Actions

Also available in: Atom PDF