Needs work
Project:
Simple hierarchical select
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jul 2018 at 00:08 UTC
Updated:
2 Jun 2025 at 16:11 UTC
Jump to comment: Most recent
Comments
Comment #2
deepakaryan1988I am having a similar issue as well.
Issue scenario:
1. clone/translate/edit any content
2. Change the category term
3. Add another term
4. Save content
5. Go edit and check. Term is reverted to previous
Working fine scenario 1
1. clone/translate/edit any content
2. Add another term
3. Change first term
4. Save content
5. Go edit and check. Changed term reflects
Working fine scenario 2
1. clone/translate/edit any content
2. Change the category term
3. Dont Add another term
4. Save content
5. Go edit and check. Changed term reflects
Can anyone help me?
Though while debugging, I find out, in AppView.js which is responsible for updating Element Value.
This above is not getting updated whenever we press Add Another item
That's weird, it's taking the previous item selected in above scenario.
Thanks for helping in advance.
Comment #3
mkindred commentedThis still seems to be an issue. The bug appears in multiple scenarios (not just when you set existing terms to 'None'), so I changed the title.
As @deepakaryan1988 mentioned, if you add a new term after changing existing terms (terms that existed prior to the current edit), then the values for the edited terms are reverted to the pre-edit values. This change happens in the background such that it looks as though your edit is OK; you find out only after you save.
Steps
Adding new term reverts changes to existing terms:
Saves OK if you add the new term before editing existing terms:
I've created a video to demonstrate the bug in a fresh D10 install: https://odysee.com/241024_drupal_shs_bug:c
Comment #4
jaydarnellI'm having a much bigger problem where the add another item button doesn't work at all. I've tried the latest release for the 2.x and 3.x branch but no luck. Clicking the Add another item button causes the existing item to disappear and then reappear but no field is added for selecting additional items.Nevermind, this appears to be a problem with my admin theme.
Comment #5
herve.tubaldoHello, any news on this issue?
I have the same problem:
I tested with versions 3.0.0-alpha4, 2.0.1 and 2.0.x-dev.
Comment #6
joseph.olstadPlease look at your browser console for js exceptions and report them if you have some related exceptions.
It was mentioned that this could be related to your theme(s).
Comment #7
herve.tubaldoHello, thank you for your reply.
I am using the "Claro" theme and I have no errors in my browser console.
Comment #8
joseph.olstadHmm @jaydarnell reported that this was an issue with his admin theme however this should work with the Claro theme.
What version of Drupal core are you using @herve.tubaldo?
Comment #9
herve.tubaldo@jaydarbell had another issue, the "add another item" button didn't work at all for him, which is not my case. I have the same problem as @mkindred or the comments before.
I am using Drupal 10.3.9
Comment #10
mkindred commentedlmk if anyone needs anything further from me. While I'm probably not up to the task of creating a patch at the moment, I can test and provide more info regarding any potential theme implications, if necessary.
Comment #11
denix commentedHello, we are using shs in webforms and no, the issue is not with the Claro theme, but as @herve.tubaldo wrote, the "add another item" button does simply not work. We are on Drupal 10.4 and module 2.0.2.
Thanks!