Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The hs_taxonomy_hierarchical_select_create_item()
function assumes that the only return value from taxonomy_term_save()
that indicates success is SAVED_NEW
. Normally, this is a safe assumption, but if a third-party module customizes the term saving process, it's possible for SAVED_UPDATED
to be returned instead.
According to the docs for drupal_write_record()
, which is what taxonomy_term_save()
uses to write out records, a better way to check for success is to see if the return code is not strictly FALSE
.
Comment | File | Size | Author |
---|---|---|---|
#1 | hierarchical_select-hs_taxonomy_hierarchical_select_create_item_does_not_handle_updates-1457228-1.patch | 1.05 KB | GuyPaddock |
Comments
Comment #1
GuyPaddock CreditAttribution: GuyPaddock commentedThe attached patch should correct the issue described.
Comment #2
GuyPaddock CreditAttribution: GuyPaddock commentedSetting to NR.
Comment #3
stefan.r CreditAttribution: stefan.r commented6.x issue without activity for over 3 years, closing.
Please reopen if this is still an issue in 7.x.
Comment #4
stefan.r CreditAttribution: stefan.r commentedOops, this is actually a 7.x issue! Re-rolled and committed this as: