Closed (won't fix)
Project:
Content Taxonomy
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Mar 2008 at 18:07 UTC
Updated:
1 Sep 2010 at 10:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
Aar0n commentedIm also getting this error.
Any update on this?
Comment #2
xtfer commentedThere are two related problems here. At lines 134 and 141 the following code sets Taxonomy data for saving as tags when the node is submitted:
$node->taxonomy[$field['vid']][$tid] = $tid;However in both cases $tid is an array, which can't be used in that context (thats the illegal offset) so we just need to code the Array out.
The solution is to change the code:
I've tested this with all 4 widget types, they all seem to deliver the array in the same format.
As a result of this patch, Taxonomy data is saved correctly.
Comment #3
marcvangendI applied the patch but unfortunately it didn't work for me. I still get the same error, nothing changed.
I noticed that I only get this error when i select the "save term lineage" option.
The other settings for my vocab are:
Hierarchy: multiple
Related terms: no
Free tagging: no
Multiple select: no /* question: is this compatible with save term lineage? */
Required: yes
Weight: 1
Use the Hierarchical Select form element for this vocabulary: yes
Save lineage: Save term lineage
Level choice: Force user to choose a term from the deepest level
Label levels: enabled
Label for the root level: Select
Comment #4
AD-DA commentedActually the patch seems related to an other error. It changes
content_taxonomy.modulewhile the error is reported incontent_taxonomy_options.module.In
content_taxonomy_options.modulethe line 159 where the error is reported seems to be the cause of the error:$keys[$node_field['tids']] = $node_field['tids'];The error occurs when the category taxonomy is setup to save the lineage of the node (using hierachical select).
Changing this line to:
$keys[$node_field['tids'][0]] = $node_field['tids'][0];removed the error, but saved only the parent in a taxonomy with 2 levels.
This need to be tested more. I've disabled in the mean time saving the lineage of the term.
Comment #5
matthew_ellis24 commentedThis is the problem I'm having as well. I'll keep an eye on this but I suspect this module isn't for me as it takes quite a while to load up each menu and it isn't really feasible for use if making many nodes.
Comment #6
AD-DA commentedActually I do not have this issue anymore with the latest version of Hierarchical Select 5.x-3.x-dev
Comment #7
summit commentedHi,
I confirm still having this issue with the latest (july 8th) version of HS.
Greetings,
Martijn
Comment #8
socialnicheguru commentedsubscribing. I have this problem for everyone but the admin account does not.
also i do not have HS enabled.
I also went back to make sure that the values for required and multiple matched the taxonomy field terms in my node content type but I still get the error.
The fix in #4 above (http://drupal.org/node/234622#comment-889836) works. I hope there are no ramifications since HS is not enabled for any of these categories that I am using.
After I upgraded, this fix no longer works.
Chris
Comment #9
nath commentedI had the error in #2 and the solution in #2 helped.
Comment #10
magnusk commentedI've also seen the line 159 error.
Would new code like the following help if it replaces that one line 159? checking whether it's an array and saving the whole array of values if so:
Comment #11
nath commentedActually, the solution in #2 doesn't help but breaks everythig. :(
Comment #12
robertgarrigos commentedI had this same problem until I decided to force the user to choose a term from a deepest level, in the Hierarchical Select widget's settings form. Otherwise, Im havig the illegal offset error message.
Update: I changed the settings again and now it's not showing the error, although it's not saving the tags properly. I guess there is a combination of settings within the vocabulary and the widget settings which prevent from showing the error. In any case, if you choose to save the cck data as tag also, this is in the taxonomy tables, it doesn't save the right data.
Comment #13
robertgarrigos commentedI see what's triggering this error but don't know yet where in the code lies the problem. This error is being triggered because the field used as hierarchical select somehow doesn't get saved as a multiple values field in the widget settigns form. There is a combination of settings that should do so but it doesn't, in fact. What I've done is commenting a line in the code of content_taxonomy_hs.module
By commenting this line you will be able to set the multiple value for that field, and this seems to work. The real solution, however, would be finding out where in the code of this module this flag should be set and it's not.
Comment #14
jdotti commentedSubscribe.
( i duplicate this issu here http://drupal.org/node/326620 ) .
Is the solution proposed by robertgarrigos stable ?
JD
Comment #15
wim leersrobbertgarrigos: content_taxonomy_hs has been removed from CVS, it should never have been committed in the first place.
Use the the Hierarchical Select module itself instead, it includes support for content_taxonomy and has been revised a lot after content_taxonomy_hs was committed.
Comment #16
jdotti commentedHi,
And do we need to delete all *hs* files from the content_taxonomy folder module ?
JD
Comment #17
jdotti commentedHi,
At the end, i still have this message, and i don't know what to do ...
JD
Comment #18
reubenavery commentedSubscribing.. having the same problem.
Comment #19
matteogeco commentedIn my case the error comes out when I select Save options -> Both in the field settings. If I select Save as tag I don't get the error...
Comment #20
magnus commentedCleanup of old issues. According to maintainer: "active development is only done for the 6.x branch! 5.x is not supported any more".
Reopen issue if problem still exist in 6.x branch.