Project

General

Profile

Actions

Bug #91293

closed

FlexForm with inline field leads to console error "this.container is null"

Added by Alex Kellner over 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-05-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

TYPO3 10.4.1

We have an own extension with a plugin and in this a FlexForm configuration where we can select some records.
Everything worked well with TYPO3 8.

Now, after updating, it's not possible to see an inline record by clicking the "+ Create New" button in FlexForm.
The browser console leads to
"this.container is null"

Example FlexForm Configuration how to reproduce:

<T3DataStructure>
    <meta>
        <langDisable>1</langDisable>
    </meta>
    <sheets>
        <main>
            <ROOT>
                <TCEforms>
                    <sheetTitle>Test</sheetTitle>
                </TCEforms>
                <type>array</type>
                <el>
                    <settings.ce>
                        <TCEforms>
                            <label>Test</label>
                            <config>
                                <type>inline</type>
                                <foreign_table>tt_content</foreign_table>
                                <foreign_field>t3ver_oid</foreign_field>
                                <foreign_sortby>sorting</foreign_sortby>
                                <foreign_label>header</foreign_label>
                                <maxitems>1</maxitems>
                            </config>
                        </TCEforms>
                    </settings.ce>
                </el>
            </ROOT>
        </main>
    </sheets>
</T3DataStructure>

Note: We do not use tt_content and not the field t3ver_oid for building relations. That is just the testcase for you.


Files

Actions #1

Updated by Georg Ringer over 4 years ago

  • Status changed from New to Needs Feedback

can you retest on master, just added

 <settings.ce>
                        <TCEforms>
                            <label>Test</label>
                            <config>
                                <type>inline</type>
                                <foreign_table>tt_content</foreign_table>
                                <maxitems>1</maxitems>
                            </config>
                        </TCEforms>
                    </settings.ce>

to a flexform and it worked.

Actions #2

Updated by Alex Kellner over 4 years ago

  • I retestet with master branch (dev-master in composer.json) in the project of the university - without success
  • I also removed all other third-party extensions and dismantled the function in the effected extension - without success
  • After this I went to my local powermail test instance, installed dev-master of TYPO3 and changed the EXT:powermail/Configuration/FlexForms/FlexformPi1.xml to this content:
<T3DataStructure>
    <meta>
        <langDisable>1</langDisable>
    </meta>
    <sheets>
        <main>
            <ROOT>
                <TCEforms>
                    <sheetTitle>Test</sheetTitle>
                </TCEforms>
                <type>array</type>
                <el>
                    <settings.ce>
                        <TCEforms>
                            <label>Test</label>
                            <config>
                                <type>inline</type>
                                <foreign_table>tt_content</foreign_table>
                                <maxitems>1</maxitems>
                            </config>
                        </TCEforms>
                    </settings.ce>
                </el>
            </ROOT>
        </main>
    </sheets>
</T3DataStructure>

Same failure (Firefox on Ubuntu) in browser console when opening the plugin: "TypeError: this.container is null" in "InlineControlContainer.js:13:2271"
Clicking on "+ Create new" does not work

After that I switched to Chrome (still on Ubuntu).
Error in Browserconsole is a bit different but with the same effect:

Uncaught TypeError: Cannot read property 'dataset' of null
    at HTMLDocument.<anonymous> (InlineControlContainer.js?bust=1588757745:13)
    at mightThrow (jquery.js?bust=1588757745:3557)
    at process (jquery.js?bust=1588757745:3625)

Actions #3

Updated by Marco Dinnbier over 4 years ago

Hi,

the error is caused by the dot in variable name.

I think, this needs some escaping for calls like

this.container = document.querySelector("#" + e) in backend/Resources/Public/JavaScript/FormEngine/Container/InlineControlContainer.js

I've workarounded this in my project by renaming variables like settings.image to image.

Regards,
Marco

Actions #4

Updated by Georg Ringer about 4 years ago

Hi Alex,

I just checked TYPO3 master and also again stable LTS 10.4.9 with latest powermail and it works for me on FF81 (mac). could you please recheck?

Actions #5

Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Needs Feedback to Closed

No feedback since a lot of time => closing this issue.

If you think that this is the wrong decision or experience the issue again, please reopen it or open a new issue with a reference to this one.

Thank you and best regards

Actions

Also available in: Atom PDF