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.
I've installed and enable HS in Drupal 7 as defined in the readme file then enabled all the options.
The readme says "3) If you want to use it for one or more of your vocabularies, go to
admin/content/taxonomy and click the "edit" link for a vocabulary. Now scroll
down and you'll find a whole range of Hierarchical Select settings. All
settings are explained there as well."
When I do this the HS settings are not there. I know it's probably something obvious that I'm doing wrong (Drupal newbie). I'd really appreciate some help as HS looks perfect for my needs.
Cheers
Gav.
Comments
Comment #1
kolja CreditAttribution: kolja commentedI may confirm the same thing.
Comment #2
xjmIn D7, taxonomy is added to nodes with term reference fields. So, add the term reference field to your content type, and then set the field widget to the hs widget.
Comment #3
blueseven CreditAttribution: blueseven commentedThanks for your help xjm. I added the term reference to my content type and linked it to my vocabulary which allowed me to set the HS settings. However, now if I try to edit the content type or add content using this content type I get the following error...
"Fatal error: Call to undefined function db_rewrite_sql() in C:\xampp\htdocs\sites\all\modules\hierarchical_select\modules\hs_taxonomy.module on line 730"
I also have these error messages if I try to edit any of the other fields in the content type...
"Notice: Undefined index: allowed_values in hs_taxonomy_form_field_ui_field_edit_form_alter() (line 143 of C:\xampp\htdocs\sites\all\modules\hierarchical_select\modules\hs_taxonomy.module).
Notice: Trying to get property of non-object in hs_taxonomy_form_field_ui_field_edit_form_alter() (line 144 of C:\xampp\htdocs\sites\all\modules\hierarchical_select\modules\hs_taxonomy.module)."
I deleted the content type and re-created it but still get the same messages.
Any help would be much appreciated.
Cheers
Gav.
Comment #4
xjm#3: Sounds like the module is not completely ported to D7 yet.
db_rewrite_sql()
is a D6 API function; it was removed in D7. I believe I saw an issue in the queue earlier for that error message, so you might want to check there.It might also be worth trying the dev snapshot, since that has been more recently updated. However, note that dev is broken at present, so you need to patch it using the patch I posted in another issue:
#1071484: Syntax error
In short, I don't think HS is ready for D7 yet. The maintainer says on the project page that he may not be able to work on it 'til fall.
Comment #5
blueseven CreditAttribution: blueseven commentedThanks again. I saw the message on the project page but I was hoping for the best as HS is just what I need. Guess I'll have to wait (unless there's another way to achieve the same).
Cheers
Comment #6
Wim LeersFixed: http://drupalcode.org/project/hierarchical_select.git/commit/fe83ae2
Comment #7
Wim LeersComment #8
Wim LeersAnd regarding the db_rewrite_sql errors, that's a duplicate of #1068462: HS Taxonomy: "entity count" support — sponsorship needed.