Hi,

I'm having an issue on a fresh drupal 7.7 install, as follows:

- install drupal
- add Hierarchical Select
- enable only Hierarchical Select and Hierarchical Select Taxonomy
- go to term add page, and the following errors appear, both listed twice:

Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of [web_root]/includes/entity.inc).
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 of [web_root]/includes/entity.inc).

- I'm not able to submit the term/add page

If I disable just Hierarchical Select Taxonomy, the error goes away, and I am able to add terms as normal. My status report is clean, and this error persists after hard refreshes.

The Hierarchical Select widget is such an improvement over the core offerings - great module. Please let me know if I can provide any more info towards this problem.

CommentFileSizeAuthor
#9 errors_18n.jpg425.79 KBstevieb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers’s picture

Version: 7.x-3.x-dev » 7.x-3.0-alpha3
Priority: Normal » Minor

Reproduced. Also in alpha 3. This prevents parent selection through HS from working. Very odd, because this used to work just fine.

Simple work-around for now: add a term, don't choose a parent. Use the term listing to drag terms under their parents. This doesn't work for vocabularies with multiple parents, of course.

yskel’s picture

Thanks for the quick response and the suggested workaround. I'll keep an eye on this thread.

Wim Leers’s picture

If you're a developer, could you please look into the cause of this problem? :)

Wim Leers’s picture

#1257920: HS generates error report and taxonomy/add terms fails was marked as a duplicate of this issue and at #1257920-1: HS generates error report and taxonomy/add terms fails, the cause has been reported.

That means this is related to the overriding of the Parent term to use a HS widget. For that to work, it is necessary that you have performed all database updates, i.e. make sure you've run update.php. Did you do that?

Wim Leers’s picture

Title: array_flip() error on term add » array_flip() error when adding a Taxonomy term

Better title.

matslats’s picture

Priority: Minor » Major
Status: Active » Needs work

In hs_taxonomy_form_taxonomy_form_term_alter, the $config declares the array key 'params' twice, the second time overriding the 'vid' param, so it later fails to load the vocab.

dboulet’s picture

I can confirm that removing the second 'params' array seems to fix the bug.

JustMagicMaria’s picture

This causes the error message to go away but new terms are no longer added to the vocabulary. (They do not show up on List tab.)

stevieb’s picture

FileSize
425.79 KB

I had the same errors and it adds an extra error with the "Internationalization" module

subscribe

AdamGerthel’s picture

subscribing

Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Status: Needs work » Fixed

Fixed. Thanks for the detailed descriptions! That made this a lot easier.

Commit: http://drupalcode.org/project/hierarchical_select.git/commit/6453499.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.