Project

General

Profile

Actions

Bug #101415

open

Cannot localize page in backend

Added by Oliver Hader 10 months ago. Updated 7 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2023-07-22
Due date:
% Done:

0%

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

Description

(Actions performed as admin user)

Error message in JavaScript console:

Uncaught TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at InputTransformer.flattenObject (input-transformer.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13:641)
    at input-transformer.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13:770
    at Array.reduce (<anonymous>)
    at InputTransformer.flattenObject (input-transformer.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13:649)
    at InputTransformer.toSearchParams (input-transformer.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13:481)
    at AjaxRequest.withQueryArguments (ajax-request.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13:352)
    at Localization.localizeRecords (localization.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13:6623)
    at Object.callback (localization.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13:5597)
    at Wizard.runSlideCallback (wizard.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13:3552)
flattenObject @ input-transformer.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13
(anonymous) @ input-transformer.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13
flattenObject @ input-transformer.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13
toSearchParams @ input-transformer.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13
withQueryArguments @ ajax-request.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13
localizeRecords @ localization.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13
(anonymous) @ localization.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13
runSlideCallback @ wizard.js?bust=f9d9bd3aaf0d3feb0db376ef46b9f751eb2d2929:13

The reason is, that in localization.ts, the corresponding action is still null, since there are two @availableLocalizationModes (copy and translate), but the handling just expects to have one...

<a href="#" class="btn btn-default btn-sm t3js-localize" title="" 
  data-page="[Translate to Dansk:] 404" data-has-elements="0" 
  data-allow-copy="1" data-allow-translate="1" data-table="tt_content" 
  data-page-id="6" data-language-id="1" data-language-name="Dansk">
...    
  Translate
</a>

Files

Screenshot 2023-07-22 at 19.46.25.png (632 KB) Screenshot 2023-07-22 at 19.46.25.png Trying to localize all content elements to Danks Oliver Hader, 2023-07-22 18:00
101415.png (168 KB) 101415.png Oliver Hader, 2023-07-22 18:18

Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Story #101564: User Interface related translation issuesNew2023-08-03

Actions
Actions #1

Updated by Oliver Hader 10 months ago

  • Related to Task #95909: Skip "localization mode" selection in localization wizard added
Actions #2

Updated by Oliver Hader 10 months ago

  • TYPO3 Version changed from 12 to 13
Actions #4

Updated by Oliver Hader 10 months ago

  • Related to deleted (Task #95909: Skip "localization mode" selection in localization wizard)
Actions #5

Updated by Oliver Hader 10 months ago

Okay, the missing action actually seems to be related to not having a default selected ("translate" or "copy") in the localization wizard (I think that was different in the past). Thus, by just clicking "next", the action stays empty and this will case the mentioned error...

Actions #6

Updated by Eric Harrer 10 months ago

  • Related to Epic #101557: Translation Handling Findings added
Actions #7

Updated by Eric Harrer 10 months ago

  • Related to deleted (Epic #101557: Translation Handling Findings)
Actions #8

Updated by Eric Harrer 10 months ago

  • Related to Story #101564: User Interface related translation issues added
Actions #9

Updated by Francois Suter 7 months ago

I'm not sure if it's correct to mention it here, but I have a similar error in another circumstance: when I try to create, for example, a menu of pages content element. While the content element is new, the suggest wizard does not work. The same error in "flattenObject" happens. As soon as the content element is saved at least once, the error goes away.

Should I report it as a separate issue?

Actions #10

Updated by Francois Suter 7 months ago

I dug into the issue I had and it is definitely different. I have opened a separate issue (https://forge.typo3.org/issues/102256).

Actions

Also available in: Atom PDF