Bug #83720

Wrong page type when translating page through localization overview

Added by Tymoteusz Motylewski almost 2 years ago. Updated 4 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2018-01-29
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When mass-translating multiple pages in Info -> Localization Overview, all pages have the same page type (doktype) set to "standard".

Steps to reproduce:
Given you have untranslated shortcut page "A".
1. go to Info module
2. switch to localization overview
3. select checkbox by the "A" page
4. click on the icon with plus sign from the column header "create new translation headers"
5. fill the titles
6. save & close

You will see that newly created page translation will have wrong page type = standard instead of shortcut

Associated revisions

Revision 18ed013f (diff)
Added by Susanne Moog 4 days ago

[BUGFIX] Use DataHandler localize in Localization Overview

Instead of opening a multi-form-engine form when creating new
translations via translation overview the datahandler is called
upon to localize the pages.

This has the advantage that it
- works
- consistently as in page module
- keeps all types (page type changed in earlier versions)

Resolves: #83721
Resolves: #83720
Releases: master, 9.5
Change-Id: I39ec0f63dce5ddcd8d3f34c849367dc2c621f8bd
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62874
Tested-by: TYPO3com <>
Tested-by: Tobi Kretschmann <>
Tested-by: Daniel Goerz <>
Reviewed-by: Tobi Kretschmann <>
Reviewed-by: Daniel Goerz <>

Revision f6bc1240 (diff)
Added by Susanne Moog 4 days ago

[BUGFIX] Use DataHandler localize in Localization Overview

Instead of opening a multi-form-engine form when creating new
translations via translation overview the datahandler is called
upon to localize the pages.

This has the advantage that it
- works
- consistently as in page module
- keeps all types (page type changed in earlier versions)

Resolves: #83721
Resolves: #83720
Releases: master, 9.5
Change-Id: I39ec0f63dce5ddcd8d3f34c849367dc2c621f8bd
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62882
Tested-by: TYPO3com <>
Tested-by: Daniel Goerz <>
Reviewed-by: Daniel Goerz <>

History

#1 Updated by Tymoteusz Motylewski almost 2 years ago

The issue is present in v7 also.
Unfortunatelly It's not that easy to solve at first sight because EditDocumentController.php expects default values (overrideVals) to be global (same value for all edited records). It's not possible to pass different doctype for each new record.

The query sent by clicking on the "create new translation headers" icons passes following parameters:

route:/record/edit
edit[pages_language_overlay][5]:new
edit[pages_language_overlay][9]:new
overrideVals[pages_language_overlay][sys_language_uid]:1
columnsOnly:title,hidden,sys_language_uid
returnUrl:/typo3/index.php?M=web_info&moduleToken=0c38bb5cabfab80ba8350eff44dd8fc971276ecb&id=5&SET[depth]=1

I've compared it to the call sent when translating single page from within page module (which sets doktype correctly):

route:/record/edit
edit[pages_language_overlay][5]:new
overrideVals[pages_language_overlay][doktype]:4
overrideVals[pages_language_overlay][sys_language_uid]:1
returnUrl:/typo3/index.php?M=web_layout&moduleToken=43726e35b7b6d042911fe3704ad4117c0c2ae9a0&id=5

see additional param "overrideVals[pages_language_overlay][doktype]:4".

The problem is that the overrideVals is global for all records passed to the edit controller.

#2 Updated by Tymoteusz Motylewski almost 2 years ago

one more thing to add is that the list module (when translating tt_content) is doing it differently (calling 'localize' instead of 'new' datahandler command)

route:/record/commit
token:ad2e597af4b055d0400169b63d8ead687ed1eb8a
prErr:1
uPT:1
cmd[tt_content][11][localize]:1
redirect:/typo3/index.php?M=web_list&moduleToken=318cc442678e966034b8bf1a856e66476ac798c2&id=35&table=tt_content&imagemode=1&justLocalized=tt_content%3A11%3A1
M:web_list
moduleToken:318cc442678e966034b8bf1a856e66476ac798c2
id:35
table:tt_content
imagemode:1
justLocalized:tt_content:11:1

route:/record/edit
token:71ffe7bef130a0b40edd53facdb2f663127a5136
edit[tt_content][207]:edit
returnUrl:/typo3/index.php?M=web_list&moduleToken=318cc442678e966034b8bf1a856e66476ac798c2&id=35&table=tt_content&imagemode=1

#3 Updated by Riccardo De Contardi almost 2 years ago

  • Category set to Localization

#4 Updated by Gerrit Code Review 4 days 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 https://review.typo3.org/c/Packages/TYPO3.CMS/+/62874

#5 Updated by Susanne Moog 4 days ago

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

#6 Updated by Gerrit Code Review 4 days ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62882

#7 Updated by Susanne Moog 4 days ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF