Bug #81891

Flexform: renderType => selectTree not loading

Added by Arun Chandran over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Performance
Target version:
Start date:
2017-07-17
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,

In TYPO3 8.7 LTS, we are facing an issue with "selectTree" render type in TCA/Flexforms. Seems like the issue with low internet connections. Can't see any errors in the debug console. If reload the TCA again and again, sometimes the tree displayed. Please see the attached screen.

Thank you.

TCA_PageTree.png View (23.4 KB) Arun Chandran, 2017-07-17 08:05

Associated revisions

Revision 7cbb3b05 (diff)
Added by Anke Altintop about 2 years ago

[BUGFIX] JS: Init SelectTreeElement after document.ready

Add document.ready, so SelectTree is initialized even
with slow internet connection.

Resolves: #81891
Releases: master, 8.7
Change-Id: I5489d37821107310f99fbccffc00fd183e2e3786
Reviewed-on: https://review.typo3.org/54310
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Tested-by: TYPO3com <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>

Revision 63857a57 (diff)
Added by Anke Altintop about 2 years ago

[BUGFIX] JS: Init SelectTreeElement after document.ready

Add document.ready, so SelectTree is initialized even
with slow internet connection.

Resolves: #81891
Releases: master, 8.7
Change-Id: I5489d37821107310f99fbccffc00fd183e2e3786
Reviewed-on: https://review.typo3.org/54177
Tested-by: TYPO3com <>
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Arun Chandran over 2 years ago

Any update for this issue? It still exists.

Thank you.

#2 Updated by Stefan Berger about 2 years ago

  • Subject changed from renderType => selectTree not loading to Flexform: renderType => selectTree not loading
  • Priority changed from Should have to Must have

I could confirm this bug, but I don't think it's related with low internet connections.

I've also done some debuggings, which shows that the value $result['selectTreeCompileItems'] in
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaSelectTreeItems::addData is false for those tree flexform fields, so no database requests are done in that tree fetchData ajax request. But toggling that flag manually doesn’t solve the bug. So it seems that there are some other reasons, which explains that false behavior.

Thank you for further investigations.

#3 Updated by Anke Altintop about 2 years ago

I could reliable simulate this with throttling the internet connection. I tracked it down to /typo3/sysext/backend/Resources/Public/JavaScript/FormEngine/Element/SelectTreeElement.js where $('.typo3-tceforms-tree .treeRecord').each(function (i, element) doesn't get executed, when $('.typo3-tceforms-tree .treeRecord') isn't loaded quick enough, which means the SelectTree isn't initialized.

So I wrapped it into a document.ready statement. I don't know if that is the best way to do it, but it solved the problem:

$(document).ready(function() {
$('.typo3-tceforms-tree .treeRecord').each(function (i, element) {
....
});

#4 Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

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

#5 Updated by Riccardo De Contardi about 2 years ago

  • Category set to Performance

#6 Updated by Gerrit Code Review about 2 years ago

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/54310

#7 Updated by Gerrit Code Review about 2 years ago

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

#8 Updated by Anke Altintop about 2 years ago

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

#9 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF