Hi all,

I'm using Hierarchical Select with Commerce KickStart beta1. Thanks for contributing this great module to make my life easier.

But there is 1 problem I found very annoying is in my product display, there is a required field called "product category" at the bottom of the form which are using HS widget. If i leave the "product category" field empty and trying to fill up others term field which is using HS widget, it will always appear the about leaving the required field empty.

Can that be fix?

Thanks.

Comments

J V’s picture

This has been annoying me for over a year now (And the more popular views exposed filter one that's even older seems to be another symptom of this issue)

The place the message is preduced is hierarchical_select.module line 878 (grep shows no other matching lines) but the bug could also be in function _hierarchical_select_form_set_error_class() line 1482.

Unfortunately this is spammed whenever there is a form discrepancy and not removed when the form is updated correctly.

IMHO the module shouldn't try to spit out "Field required" error messages with jquery but just let core handle it. (After it's own validation of deepest term etc) Unfortunately, it seems to have disabled the core field check completely and I haven't got any idea where to look in this file for that.

In the meantime I'm hackishly adding this to my css files:

.field-widget-taxonomy-hs .messages.error {
display:none;
}
Wim Leers’s picture

Status: Active » Postponed (maintainer needs more info)

I'll need precise steps to reproduce on a vanilla Drupal installation to be able to fix this, and preferably a patch.