I have been using RC3 quite successfully and went today to upgrade to RC5. I now get a whitescreen when viewing any node. If I go to the edit url (node/1234/edit) of the node everything works as expected including HS. If I disable the HS for Taxonomy module everything works but then for my purposes I might as well not have HS installed. I changed the theme to Garland in case something weird was happening in a block or the theme itself but still whitescreen on node view. If I rollback to RC3 all is well.

I spent some time turning on/off any other module that I thought might be conflicting but so far the only way I can cause/remedy the problem is to flip between RC3 and RC5.

My particulars are Drupal 5.10, PHP 5.2.6 and MySQL 4.1.22

Comments

bennos’s picture

Same problem. edit does not work anymore. just viewing the page does not work also, what makes me a little bit confused, because there is no HS on the published node.

Error Log entry:
2008-10-07 03:50:23: (mod_fastcgi.c.2610) FastCGI-stderr: PHP Fatal error: Cannot use object of type stdClass as array in /var/www/.../httpdocs/sites/all/modules/hierarchical_select/hierarchical_select.module on line 1845

bennos’s picture

Priority: Normal » Critical

forgotten. changing priority to critical.

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Active » Postponed (maintainer needs more info)

I suspect this is the same bug as http://drupal.org/node/317765. (Also caused by Token crappiness.)

Please try the dev tarball, in which this has been fixed.

rokr’s picture

Same problem here. And doesn't work with 5.x-3.x-dev (2008-Oct-07)
Same error message at WSOD when viewing/editing the node:
Fatal error: Cannot use object of type stdClass as array in /www/htdocs/sites/all/modules/hierarchical_select/hierarchical_select.module on line 1845

wim leers’s picture

Try commenting out all "token" functions for a minute, to see if that fixes the problem.

grahamba’s picture

Just tried dev (2008-Oct-07) and still a bust. I tried RC4 and that seems to be where the problem starts for me. Whitescreen on node view and if I do edit a node and hit submit these errors show up in the log

* warning: Invalid argument supplied for foreach() in D:\apache\htdocs\mediadev\sites\all\modules\hierarchical_select\hierarchical_select.module on line 1841.
* warning: Invalid argument supplied for foreach() in D:\apache\htdocs\mediadev\sites\all\modules\hierarchical_select\hierarchical_select.module on line 1916.
* warning: Invalid argument supplied for foreach() in D:\apache\htdocs\mediadev\sites\all\modules\hierarchical_select\modules\hs_taxonomy.module on line 415.

With RC3 all is well.

grahamba’s picture

Ok I nuked all the token stuff from the hs_taxonomy.module (the latest dev) and all is well. So for me at least the problem seems to be there.

nath’s picture

Cronjobs fail with that message as well. Will try the dev version.

nath’s picture

The dev version (at least the one linked from the modules page) doesn't fix this.

wim leers’s picture

nath: please try to do the same as grahamba. That'd confirm my suspicion.

nath’s picture

I'm not sure what I should comment out. Could you give me a hint?

wim leers’s picture

These two functions:

function hs_taxonomy_token_list() { … }
function hs_taxonomy_token_values() { … }

nath’s picture

Thanks, this seems to have worked. At least, the cron run finishes.

wim leers’s picture

Title: HS for Taxonomy causes whitescreen on node view but not edit » Token support in HS Taxonomy causes errors when it isn't supposed to run
Status: Postponed (maintainer needs more info) » Active

So … Token is an even weirder beast than I thought :( I'll have to add better detection.

wim leers’s picture

Status: Active » Needs review
StatusFileSize
new2.63 KB

Ok, undo your manual changes to hs_taxonomy.module and apply this patch instead. (How to apply a patch: http://drupal.org/patch/apply.)

nath’s picture

Seems to work.

grahamba’s picture

After patching I no longer get a whitescreen on node view but I get these errors after editing a node

* warning: Invalid argument supplied for foreach() in D:\apache\htdocs\mediadev\sites\all\modules\hierarchical_select\modules\hs_taxonomy.module on line 433.
* warning: Invalid argument supplied for foreach() in D:\apache\htdocs\mediadev\sites\all\modules\hierarchical_select\hierarchical_select.module on line 1843.
* warning: Invalid argument supplied for foreach() in D:\apache\htdocs\mediadev\sites\all\modules\hierarchical_select\hierarchical_select.module on line 1918.
* warning: Invalid argument supplied for foreach() in D:\apache\htdocs\mediadev\sites\all\modules\hierarchical_select\modules\hs_taxonomy.module on line 452.

wim leers’s picture

StatusFileSize
new3.12 KB

Reroll, with extra failproof detection that hopefully cover your problems, grahamba.

grahamba’s picture

Patch applied to dev and seems to have done the trick. HS works as usual and no whitescreen on node view and no errors on node edit or node creation. Yay! Again, thanks for an awesome module and taking care of the token wackiness.

wim leers’s picture

Status: Needs review » Fixed

Awesome! :) Committed!

rokr’s picture

I've just tested rc6 and everything works for me now. Thanks!

wim leers’s picture

Great :)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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