The patch and hook implementation works (it even works with the latest release). But I see some issues with theming on Drupal 10 and Olivero theme, see the screenshot.
It can be fixed with the CSS like this:
.form-type-boolean { display: inline-block; } ul.term-reference-tree-level { list-style-type: none; }
We applied this method to the filter of Search API view and have found the following issue. If the "Allow multiple selections" option of the filter is not selected then we got white screen and the following error message in logs:
"Error: Cannot create references to/from string offsets in Drupal\Component\Utility\NestedArray::setValue() (line 155 of /home3/servicg6/public_html/d2/core/lib/Drupal/Component/Utility/NestedArray.php)."
But if the "Allow multiple selections" option is checked then everything ok. More over if after rebuilding of the caches unset this option the filter continue to works without problem.- π§πͺBelgium Belba
Thanks to the people above for getting this working.
Followed the instructions above and had a well-functioning term reference tree for months. Recently I updated my website to version 10.1 and suddenly the tree no longer works, the exposed filters disappear. Is there anyone experiencing the same problem? Are there changes to be made to the code?