Skip to content
Snippets Groups Projects
Commit 3ab68ba3 authored by Christian Kuhn's avatar Christian Kuhn Committed by Wouter Wolters
Browse files

[BUGFIX] LocalizationStateSelector with new records

The LocalizationStateSelector field wizard on new, not yet persisted records
casts the ['databaseRow']['uid'] to integer which leads to 0 if the uid is
'NEW1234...'.

Example (wrong) field name in formEngine:
 data[pages_language_overlay][0][l10n_state][subtitle]
Should:
 data[pages_language_overlay][NEW1234][l10n_state][subtitle]

Thus, field wizards values different from default are not stored.
The patch changes the int cast to an htmlspecialchars() to transfer
correct record uid for new records, too.

Change-Id: Ic77bf1c1e5fc0ebfcf8837bf6848ab1a201852a4
Resolves: #80405
Releases: master
Reviewed-on: https://review.typo3.org/52127


Reviewed-by: default avatarJan Helke <typo3@helke.de>
Tested-by: default avatarJan Helke <typo3@helke.de>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
parent 6d5af8da
Branches
Tags
No related merge requests found
......@@ -75,7 +75,7 @@ class LocalizationStateSelector extends AbstractNode
);
$fieldElementName = 'data[' . htmlspecialchars($this->data['tableName']) . ']'
. '[' . (int)($this->data['databaseRow']['uid']) . ']'
. '[' . htmlspecialchars((string)$this->data['databaseRow']['uid']) . ']'
. '[' . htmlspecialchars($l10nStateFieldName) . ']'
. '[' . htmlspecialchars($this->data['fieldName']) . ']';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment