Bug #105578
openLost MM relations in workspaces
0%
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
uid | t3ver_oid | t3ver_wsid | t3ver_state |
---|---|---|---|
1 | 0 | 0 | 0 |
uid | t3ver_oid | t3ver_wsid | t3ver_state |
---|---|---|---|
1 | 0 | 0 | 0 |
2 | 0 | 0 | 0 |
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
uid | t3ver_oid | t3ver_wsid | t3ver_state |
---|---|---|---|
1 | 0 | 0 | 0 |
uid | t3ver_oid | t3ver_wsid | t3ver_state |
---|---|---|---|
1 | 0 | 0 | 0 |
2 | 0 | 0 | 0 |
3 | 1 | 1 | 1 |
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
uid | t3ver_oid | t3ver_wsid | t3ver_state |
---|---|---|---|
1 | 0 | 0 | 0 |
2 | 1 | 1 | 1 |
uid | t3ver_oid | t3ver_wsid | t3ver_state |
---|---|---|---|
1 | 0 | 0 | 0 |
2 | 0 | 0 | 0 |
3 | 1 | 1 | 1 |
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.
uid | t3ver_oid | t3ver_wsid | t3ver_state |
---|---|---|---|
1 | 0 | 0 | 0 |
|
|
|
|
uid | t3ver_oid | t3ver_wsid | t3ver_state |
---|---|---|---|
1 | 0 | 0 | 0 |
2 | 0 | 0 | 0 |
3 | 1 | 1 | 1 |
uid_local (product uid) | uid_foreign (reference uid) |
---|---|
1 | 3 |
1 | 2 |
|
|
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.
uid | t3ver_oid | t3ver_wsid | t3ver_state |
---|---|---|---|
1 | 0 | 0 | 0 |
uid | t3ver_oid | t3ver_wsid | t3ver_state |
---|---|---|---|
1 | 0 | 0 | 0 |
2 | 0 | 0 | 0 |
|
|
|
|
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