Bug #72369

Bug #71298: Fix missing/broken RTE features after Link Handler API merge

"TBE folder selector" pop-up folder tree broken

Added by Felix Nagel over 3 years ago. Updated 6 months ago.

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

100%

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

Description

The "TBE folder selector" pop-up (comes with TCA type group with internal_type folder) has JS errors when trying to expand a tree node using the arrow icons:

Uncaught ReferenceError: Tree is not defined

This makes navigating the folder tree impossible.

Steps to reproduce:

  1. Open the "TBE folder selector" popup (click folder icon next to input)
  2. Use one of the arrow icons in order to expand a tree node
  3. Nothing happens, JS error in concole

Tested in Chrome 47 / Win 8.1

This bug report is a follow-up to #70449 and #72242


Related issues

Related to TYPO3 Core - Bug #72242: Using TCA type group with internal_type folder throws JS errors in backend Closed 2015-12-15

Associated revisions

Revision 33ced562 (diff)
Added by Wouter Wolters over 2 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 over 2 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 Riccardo De Contardi about 3 years ago

  • Category set to Backend User Interface

I've done this test with the latest 8.0-dev master:

1) create a new CE
2) on header section, click on "Link" icon
3) click on the "folder" tab
4) try to expand a node clicking the arrow

Result: the JS console reports the error:

Uncaught TypeError: require is not a function(anonymous function) 

Should I perform a different test?

#2 Updated by Felix Nagel about 3 years ago

Yes, you will need to use a field of type "group" with internal_type "folder".

There is currently no example in core (at least in TYPO3 7.6), but you could use my extension:
https://github.com/fnagel/pluploadfe
and remove this hotfix: https://github.com/fnagel/pluploadfe/commit/2e8db2074785caf84337cd8abe663bd0f04c1929

ps: You described use case does not trigger any JS error in my TYPO3 7.6 instance (tested with latest Chrome)

#3 Updated by Renzo Lauper almost 3 years ago

I see the same problem in three different TYPO3 installations (all 7.6.4). One of them is a completely raw installation.
As soon as I click on one of the triangle icons to unfold this folders subfolders I get a JS error and the subfolders don't show:

JS error "Uncaught ReferenceError: Tree is not defined" in /typo3/index.php?route=%2Fwizard%2Frecord%2Fbrowse&token=bf3be288847dbc1f2d4198fe24af4fd37f1ad00e&mode=folder&bparams=data[tt_content][27][pi_flexform][data][sDEF][lDEF][settings.folder][vDEF]||||:92

I can reproduce this error whether the folder dialog is called from the flexform of a plugin or from a TCA field.

#4 Updated by Attila Gl├╝ck almost 3 years ago

Hi

I have the same problem with internal_type "folder"
Typo3 7.6.9 Chrome 49

#5 Updated by Sascha Schieferdecker almost 3 years ago

I have the same problem while using alm_gallery in 7.6.9. The flexform config is as follows:


            <settings.foldergallery.flexform.folderPath>
                <TCEforms>
                    <label>LLL:EXT:alm_gallery/Resources/Private/Language/locallang_db.xml:tx_almgallery_foldergallery.folderPath</label>
                    <config>
                        <type>group</type>
                        <internal_type>folder</internal_type>
                        <maxitems>1</maxitems>
                        <size>1</size>
                      </config>
                </TCEforms>
            </settings.foldergallery.flexform.folderPath>

I just switched to a simple folder based gallery, because creating FAL file collections don't work in workspaces. I think this a bad situation, because when developing a gallery with workspaces in mind you can't let your users create file collections, it doesn't work in workspaces. So I thought, okay, let the user pick a folder. Then I ran into this bug. So as a workaround I used the logic that the core uses to create a file collection in a flexform and created an own extension where I generate a select with all the folders the user has access to. If anyone is interested in the flexform and the corresponding itemsProcFunc just message me.

#6 Updated by Markus Klein over 2 years ago

  • Parent task set to #71298

#7 Updated by Gerrit Code Review over 2 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

#8 Updated by Gerrit Code Review over 2 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

#9 Updated by Gerrit Code Review over 2 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

#10 Updated by Wouter Wolters over 2 years ago

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

#11 Updated by Felix Nagel over 2 years ago

Verified in TYPO3 CMS 7.6.11: TCA type group with internal_type folder works again!

Thanks a lot Wouter and Benni!

#12 Updated by Benni Mack 6 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF