Project

General

Profile

Actions

Bug #78985

closed

Flexform inline elements with dots need escaping

Added by Tabea Oertel almost 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2016-12-13
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

If you are using TCA fields with dots the dots need to be escaped because javascript cant find the element if the id has a dot inside.

The bug occurs if you have an element linke <settings.testImage> from type "inline" with "maxitems" set to 1 and minitems set to 1.
The button to add an image disapears when adding one image and does not show up again, when deleting that image. Thats a huge problem when that field is a required field because u cant add an image again, but you cant save the content element, too.

The Problem is located in file sysext/backend/Resources/Public/JavaScript/jsfunc.inline.js in following functions:

  • hideElementsWithClassName
  • showElementsWithClassName

Inside the functions the 'parentObject' need to be escaped through the available function this.escapeObjectId() to work properly.

Like this:

    hideElementsWithClassName: function (selector, parentElement) {
        TYPO3.jQuery('#' + this.escapeObjectId(parentElement)).find(selector).fadeOut(200);
    },

    showElementsWithClassName: function (selector, parentElement) {
        TYPO3.jQuery('#' + this.escapeObjectId(parentElement)).find(selector).fadeIn(200);
    },

This bug occurs with Version 7.6

Actions

Also available in: Atom PDF