Problem/Motivation
After updating to version 2.0.6, the SHS widget no longer renders the hierarchical select list. Instead, the widget outputs empty HTML, so no select fields or hierarchy are displayed.
Drupal: 10.6.14
PHP: 8.4
Proposed resolution
Downgrading to 2.0.5
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 3613802-empty-widget-output.mp4 | 2.48 MB | dkmishra |
| #4 | 3613802-empty-widget-output.patch | 2.37 KB | dkmishra |
Issue fork shs-3613802
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
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.