Actions
Bug #81961
closedEXT:form If values in single select field contains dots (f.e. emails) JS saving and rendering fails.
Start date:
2017-07-25
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Remote Sprint
Description
If value of single select field contain dots it fails after saving.
Value with dots should be escaped and saved to yaml in some special notations, because key with dots will fail yaml to array convert also.
So if value of single select field need to be used as recipient email it will not work as it work with any other field where email will be saved as a value in yaml and not as a key as it is in case of single select field.
Reason of bad saving is that all options in JS are splitted by dots.
Core.js line 796
while (path.indexOf('.') > 0) {
var firstPartOfPath, nextPartOfPath;
firstPartOfPath = path.slice(0, path.indexOf('.'));
path = path.slice(firstPartOfPath.length + 1);
if ($.isNumeric(firstPartOfPath)) {
firstPartOfPath = parseInt(firstPartOfPath);
}
if ('undefined' === $.type(obj[firstPartOfPath])) {
nextPartOfPath = path.slice(0, path.indexOf('.'));
if ($.isNumeric(nextPartOfPath)) {
obj[firstPartOfPath] = [];
} else {
obj[firstPartOfPath] = {};
}
}
obj = obj[firstPartOfPath];
}EXT:form If values in single select field contains dots (f.e. emails) JS saving and rendering fails.
So if value of single select field need to be used as recipient email it will not work as it work with any other field where email will be saved as a value in yaml and not as a key as it is in case of single select field.
As usual 'path' variable here contains value - 'properties.options.VALUE', but in case if value contain dots there is 'properties.options.my.email@test.com' which brakes all splitting logic.
Actions