Needs review
Project:
Simple hierarchical select
Version:
2.0.x-dev
Component:
User interface
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2026 at 09:28 UTC
Updated:
13 Oct 2026 at 20:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #4
dkmishra commentedPatch attached, please review.
Comment #5
pasquallethe patch fixed the issue
Comment #6
webnicola commentedConfirmed: the patch fixed the issue for me as well on Drupal 10.6.15 with SHS 2.0.6. Thanks!
Comment #7
alrueden commentedThe patch fixed the issue. I tried it with both Drupal 10.6.14 and 10.6.15 and noticed no additional problems. Thanks!
Comment #8
jonathan_hunt commentedI am getting the exact same error on 3.0.0-beta6. Reverting to 3.0,0-beta5 solved the problem. The patch #4 also applied against 3.0.0-beta6 on Drupal 10.6.15 to solve the issue.
Comment #9
fabianfiorotto commentedThe patch didn't work for me. The only solution is to roll back to version 2.0.5.
Comment #10
kovalevm commentedI confirm the issue. The patch didn't help, so I had to roll back to version 2.0.5. Please help!
Comment #11
dkmishra commentedRe-tested this directly against the 2.0.6 tag to confirm the fix.
git checkout 2.0.6in modules/contrib/shs, thendrush cr-- confirms the bug: the Category field renders with no select/hierarchy widgets at all (empty output), matching the original report.wget https://www.drupal.org/files/issues/2026-08-02/3613802-empty-widget-output.patchpatch -p1 < 3613802-empty-widget-output.patch-- patches src/Cache/ShsTermCacheDependency.php and src/Plugin/Field/FieldWidget/OptionsShsWidget.php with no rejects.
drush cr,reloadednode/add/article— the Category widget now renders correctly with the full hierarchical select cascade.Screen recording attached showing the before/after. Since this reproduces and resolves cleanly on the 2.0.6 tag. Happy to rebase the MR if needed.
Comment #12
kovalevm commentedThank you for your detailed testing and the video! I really appreciate your work on this issue.
I confirm that I also tested the patch (#4) on my production site, but unfortunately it did not resolve the issue for me. The widget still rendered empty HTML after applying the patch, clearing caches, and even rebuilding the site's container.
Here are my environment details:
What I tried:
I'm wondering if there might be a conflict with another module, or perhaps with the way the field is configured in my setup. Here are the fields I'm using SHS with:
Could there be a specific configuration or dependency that affects the patch's effectiveness?
Do you think this could be related to Organic Groups? My fields are both OG-related, and the issue only appeared after updating SHS.
Comment #13
dkmishra commentedThanks for the detailed environment information, @kovalevm — that's very helpful in narrowing this down.
Since the patch has been confirmed to work for some of us, this may indicate a separate underlying issue rather than a problem with the patch itself.
Could you check whether a plain taxonomy reference field (not OG-related) using the SHS widget renders correctly on the same site? That would help us determine whether the issue is specific to OG or related to a any other configuration issue on your installation.
Comment #14
kovalevm commentedI updated the module to the latest version 2.0.7 and tested it on other content types. The issue persists not only with the "Community Entry" (Organic Group) content type, but also with all other content types if I select the "SHS" category selection type. Please help!
Comment #15
eryk commentedThanks for working on this. Unfortunately, I can confirm that the issue is still present in SHS 2.0.7.
After updating to 2.0.7, the widget still renders empty HTML and the hierarchical select list is not displayed. Downgrading to 2.0.5 resolves the issue again.
Comment #16
kovalevm commentedI confirm, the problem persists and can only be solved by rolling back to 2.0.5.
Comment #17
eduardo.heuvel commentedI can confirm this issue (or similar, maybe because of the same bug) on SHS version 2.0.7.
In my setup, when editing an existing node that already has values saved, the select options themselves render correctly, but the previously saved selections are immediately wiped/reset to empty.
Downgrading back to 2.0.5 resolves the issue completely—the saved values are properly pre-selected on node edit, and the conditional logic works as expected.
Comment #18
carlitus commentedTwo different bugs in this issue, which is why #4 works for some and not
for others:
1. The D10 fatal in ShsTermCacheDependency - that's what MR !55 fixes.
2. Stored values not preselected (#17) - regression from #3517342 in
2.0.4, not touched by MR !55. Filed as https://www.drupal.org/project/shs/issues/3620147.
Comment #19
summit commentedHi,
I think I made a patch for this, together with AI, see attachment.
The problem is ShsTermCacheDependency::getCacheTags() fatal errors on Drupal 10 (undefined method getBundleListCacheTags()).
ince #3613025 (released in 3.0.0-beta6), ShsTermCacheDependency::getCacheTags() calls EntityTypeInterface::getBundleListCacheTags($bundle). This method was only added to Drupal core in the 11.x branch (drupal.org/project/drupal/issues/3501508, committed March 2025) and does not exist on Drupal 10.x, even though shs's core_version_requirement currently declares compatibility with ^10.5 || ^11.1.
Steps to reproduce:
Run Drupal 10.6.x core with shs 3.0.0-beta6 or beta7.
Configure an entity reference field with the shs widget on a taxonomy vocabulary with more than one level.
Open the node edit form. The widget containers render, but every /shs-term-data/... request returns HTTP 500.
attached patch guards the call with method_exists() and falls back to manually building the _list: cache tag (the same format getBundleListCacheTags() produces) when the core method isn't available, so behavior is unchanged on Drupal 11 and restored on Drupal 10.
greetings,
Comment #20
kovalevm commentedI'd like to wait for the official release to fix the problem.
Comment #21
ianduchesne commentedIf it helps anyone, I was able to get 2.0.7 working again and showing the values in the selects. A function was removed that is needed. I know it re-introduces the issue when deleting a taxonomy term that is still referenced by a node may cause an error when that node is saved again, we can live with that for now as an edge case.
I am sharing the patch we applied that fixes the issue until the issue is resolved upstream.
Comment #22
kovalevm commentedHello, when will the official bug-fix update be released?
Comment #23
liam morlandThis is the issue raised in comment 17.
Comment #24
kovalevm commentedPatch 59 didn't help me; there is no option to select the value. Only version 2.0.5 works. Please fix this in the official release!