Bug #76868

Folder selector (flexform) javascript error: Tree is not defined

Added by Markus Blaschke about 3 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-06-29
Due date:
% Done:

100%

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

Description

I've added a folder selector to flexform. If a user now click on the folder selector button the popup opens with the tree but the tree cannot be opened/closed because there is JavaScript error:
Uncaught ReferenceError: Tree is not defined

Flexform configuration:

<settings.folderFilter>
    <TCEforms>
        <label>Folders</label>
        <config>
            <type>group</type>
            <internal_type>folder</internal_type>
            <maxitems>9999</maxitems>
            <size>10</size>
        </config>
    </TCEforms>
</settings.folderFilter>

If I change the internal_type to file it's working but we want folders instead of files.

Associated revisions

Revision 33ced562 (diff)
Added by Wouter Wolters about 3 years ago

[BUGFIX] Fix undefined Tree error in FolderBrowser

Add the missing LegacyTree initialization to FolderBrowser.

Resolves: #76868
Resolves: #72369
Releases: master,7.6
Change-Id: I47494087e46ae63e100e38ff5345b230030c8b7d
Reviewed-on: https://review.typo3.org/49226
Tested-by: Bamboo TYPO3com <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

Revision fdcd5e39 (diff)
Added by Wouter Wolters about 3 years ago

[BUGFIX] Fix undefined Tree error in FolderBrowser

Add the missing LegacyTree initialization to FolderBrowser.

Resolves: #76868
Resolves: #72369
Releases: master,7.6
Change-Id: I47494087e46ae63e100e38ff5345b230030c8b7d
Reviewed-on: https://review.typo3.org/49312
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

History

#1 Updated by Markus Blaschke about 3 years ago

In file typo3/sysext/recordlist/Classes/Browser/FolderBrowser.php:


    /**
     * @return void
     */
    protected function initialize()
    {
        parent::initialize();
        $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Recordlist/BrowseFolders');
        $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LegacyTree', 'function() {
            DragDrop.table = "folders";
        }');
    }

the LegacyTree fixes the issue but the ajax call is still not working.
Maybe it's not the right javascript?!

#2 Updated by Felix Nagel about 3 years ago

Most likely a duplicate of #72369

#3 Updated by Gerrit Code Review about 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49226

#4 Updated by Gerrit Code Review about 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49226

#5 Updated by Gerrit Code Review about 3 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49312

#6 Updated by Wouter Wolters about 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Benni Mack 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF