#107274Multiple category trees are not always visible
Description
Given the following TCA excerpt where the used variables are all integers
'categories' => [
'label' => 'LLL:' . <path_to_locallang.xlf> . 'event.categories',
'config' => [
'type' => 'category',
'minitems' => 1,
'treeConfig' => [
'startingPoints' => $rootCategory,
'appearance' => [
'maxLevels' => 2,
'nonSelectableLevels' => '0',
],
],
],
],
'daytime' => [
'label' => 'LLL:' . <path_to_locallang.xlf> . 'event.daytime',
'config' => [
'type' => 'select',
'renderType' => 'selectTree',
'foreign_table' => 'sys_category',
'treeConfig' => [
'parentField' => 'parent',
'startingPoints' => $rootDaytime,
'appearance' => [
'expandAll' => true,
'showHeader' => true,
'maxLevels' => 1,
'nonSelectableLevels' => '0',
],
],
],
],
'location' => [
'label' => 'LLL:' . <path_to_locallang.xlf> . 'event.location',
'config' => [
'type' => 'category',
'treeConfig' => [
'startingPoints' => $rootLocation,
'appearance' => [
'maxLevels' => 1,
'nonSelectableLevels' => '0',
],
],
],
],
the corresponding view in the backend is in most cases visible but sometimes not.
If they are not visible they are visible in most cases after a reload but it sometimes also took 2 to 3 reloads until they were visible.
The reason for the undisplay is seen in the console of the Google Chrome browser:
undisplayed-categories-due-to-unloadable-mutation-server.png
The MutationObserver cannot be loaded because selectTree hasn’t been loaded at that point of time.
So the MutationObserver should wait until selectTree is loaded to sort the issue out.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.