Bug #61179

Epic #58282: Workspaces Workpackage #2

Story #58284: Bug fixes & Behaviour

Flaws in copying a page with localized content elements

Added by Oliver Hader over 5 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Workspaces
Target version:
Start date:
2014-08-25
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

Scenario:
  • in Live Workspace
  • Page
  • content element for default language
  • content element localization with reference to the default record
Action:
  • in Draft Workspace
  • copy the mentioned page
Experience:
  • copy process works
  • open new inserted page on Web>List module
  • translation for the content element is not shown
Reason:
  • the translation pointer value for the new placeholder is not updated and still points to the record of the origin page

source-page-from-live-ws.png View (141 KB) Daniel Goerz, 2015-08-21 23:09

copy-of-page-in-ws.png View (149 KB) Daniel Goerz, 2015-08-21 23:09

CloningResultInDraftWorkspace.png View - Second cloning result of page (53) in draft workspace (1) (84.3 KB) Oliver Hader, 2015-08-22 11:23


Related issues

Related to TYPO3 Core - Task #68395: Make CE copy action more flexible Closed 2015-07-20
Related to TYPO3 Core - Bug #64939: Copying a translated page in Workspace duplicates the first content element Closed 2015-02-09
Related to TYPO3 Core - Bug #64941: Display of translation after copying a page in workspace Closed 2015-02-09

Associated revisions

Revision 6b88e954 (diff)
Added by Oliver Hader about 4 years ago

[BUGFIX] Flaws in copying a page with localized content elements

Copying a page with localized content elements in a workspace
has some flaws. In a workspace a duplicated record will end up
in a new-placeholder and the specific version record.

The tranlation pointer field of the new-placeholder still
contains the unmodified value of the original record, the
specific version record is fine however.

The reason for that is the special handling for cloning a page
in DataHandler. Each record of a particular table is copied in
reverse order. This way, the localization is created earlier
than the record of the default language.

This change is about skipping the direct copyRecord() call for
records that will be processed inside another copyRecord() call
for the record of the default language.

Resolves: #61179
Releases: master, 6.2
Change-Id: I6647b02095343756d3a41b0c0e985b4777429cd8
Reviewed-on: http://review.typo3.org/32356
Reviewed-by: Andreas Wolf <>
Tested-by: Andreas Wolf <>
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>

Revision 3eaa2717 (diff)
Added by Oliver Hader about 4 years ago

[BUGFIX] Flaws in copying a page with localized content elements

Copying a page with localized content elements in a workspace
has some flaws. In a workspace a duplicated record will end up
in a new-placeholder and the specific version record.

The tranlation pointer field of the new-placeholder still
contains the unmodified value of the original record, the
specific version record is fine however.

The reason for that is the special handling for cloning a page
in DataHandler. Each record of a particular table is copied in
reverse order. This way, the localization is created earlier
than the record of the default language.

This change is about skipping the direct copyRecord() call for
records that will be processed inside another copyRecord() call
for the record of the default language.

Resolves: #61179
Releases: master, 6.2
Change-Id: I6647b02095343756d3a41b0c0e985b4777429cd8
Reviewed-on: http://review.typo3.org/43906
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>

History

#1 Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32356

#2 Updated by Oliver Hader about 5 years ago

  • Description updated (diff)

#3 Updated by Mathias Schreiber almost 5 years ago

  • Target version set to 7.5

#4 Updated by Gerrit Code Review almost 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32356

#5 Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32356

#6 Updated by Daniel Goerz over 4 years ago

Here is what I do:

In Live WS:
  1. Create a new Page
  2. Create a translation of that page
  3. Create a Content Element on that page
  4. Create a translation of that Content Element
    (See Screenshot "source-page-from-live-ws")
In WS:
  1. Copy that page
  2. Insert after that page
  3. View the new pasted page in page module
    (see Screenshot "copy-of-page-in-ws")
Issues:
  1. The tranlated Content Element was created twice
  2. The Button for translate default content is shown nevertheless
Expectation:
  1. Only one tranlated Content Element
  2. No "translate default" button

#7 Updated by Oliver Hader over 4 years ago

Thanks for your analysis and documentation of your findings.

Unfortunately, I could not reproduce the duplication issue of the content records - the database view on tt_content seems to be fine as well.
The issue with the button is reproducible however, but needs to be solved differently for the viewing component in the page module (it's a misinterpretation of the record data).

mysql> select uid,pid,sys_language_uid,l18n_parent,header,t3ver_oid,t3ver_state,t3ver_wsid from tt_content order by uid DESC limit 16;
+-----+-----+------------------+-------------+----------------------------------------------------+-----------+-------------+------------+
| uid | pid | sys_language_uid | l18n_parent | header                                             | t3ver_oid | t3ver_state | t3ver_wsid |
+-----+-----+------------------+-------------+----------------------------------------------------+-----------+-------------+------------+
### second cloning result of page (53) in draft workspace (1)
| 291 |  -1 |                1 |         288 | [Translate to German:] Content                     |       290 |          -1 |          1 |
| 290 |  56 |                1 |         288 | [Translate to German:] Content                     |         0 |           1 |          1 |
| 289 |  -1 |                0 |           0 | Content                                            |       288 |          -1 |          1 |
| 288 |  56 |                0 |           0 | Content                                            |         0 |           1 |          1 |
### first cloning result of page (53) in draft workspace (1)
| 287 |  -1 |                1 |         284 | [Translate to German:] Content                     |       286 |          -1 |          1 |
| 286 |  54 |                1 |         284 | [Translate to German:] Content                     |         0 |           1 |          1 |
| 285 |  -1 |                0 |           0 | Content                                            |       284 |          -1 |          1 |
| 284 |  54 |                0 |           0 | Content                                            |         0 |           1 |          1 |
### content in default and target language (1) in live workspace
| 283 |  53 |                1 |         282 | [Translate to German:] Content                     |         0 |           0 |          0 |
| 282 |  53 |                0 |           0 | Content                                            |         0 |           0 |          0 |

#8 Updated by Oliver Hader over 4 years ago

I guess that #68395 might be a relevant candidate for the button thingy...

#9 Updated by Daniel Goerz over 4 years ago

Did you really apply the patch? I get your results without the patch. No matter what, with the patch I get two translated CEs. maybe someone else can test this as well.

#10 Updated by Daniel Goerz over 4 years ago

OK, I did more tests. Created new PageTrees with two or more languages and wasn't able to reproduce the double creation either. however in the first PageTree I cant make the double creation disappear but I wont blame the pacth any longer and remove my -1. I will investigate further and let you know If I find a way to reproduce the double creation issue.

#11 Updated by Oliver Hader about 4 years ago

  • Sprint Focus set to Stabilization Sprint

#12 Updated by Benni Mack about 4 years ago

  • Target version changed from 7.5 to 7 LTS

#13 Updated by Gerrit Code Review about 4 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43906

#14 Updated by Oliver Hader about 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#15 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF