Bug #81891
closedFlexform: renderType => selectTree not loading
100%
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.
Files
Updated by Arun Chandran over 7 years ago
Any update for this issue? It still exists.
Thank you.
Updated by Stefan Berger over 7 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.
Updated by Anke Altintop about 7 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) {
....
});
Updated by Gerrit Code Review about 7 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
Updated by Gerrit Code Review about 7 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
Updated by Gerrit Code Review about 7 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
Updated by Anke Altintop about 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 7cbb3b05c8aed8e8887e1639988ccad6e591c40f.