Project

General

Profile

Actions

Bug #81961

closed

EXT:form If values in single select field contains dots (f.e. emails) JS saving and rendering fails.

Added by Andriy Khamuliak over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
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 '' which brakes all splitting logic.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #80197: EXT:form - label with periods causes PHP warningClosed2017-03-08

Actions
Actions

Also available in: Atom PDF