[BUGFIX] LocalizationStateSelector with new records 27/52127/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 22 Mar 2017 16:53:09 +0000 (17:53 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 22 Mar 2017 18:53:28 +0000 (19:53 +0100)
commit3ab68ba3f365f7c3d46411c94dd043f194f3c3b1
tree8fa9d4383ccf9d5147c1ca52a70165c2136d953f
parent6d5af8da45bbdce2928b28301d0914b1e7dce899
[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: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Form/FieldWizard/LocalizationStateSelector.php