I'm sorry if it's duplicated, there is so many issues that I'm not patient to read...
When editing a CCK Node with a 3-level (my case; but I think that it'd happens with n-levels) HS Content Taxonomy Field, I edit the 1st or the 2nd levels, and the values of drop-down boxes of next levels (respectively, 2nd and 3rd levels, or 3rd level) aren't being refreshed with the new content that it should be. Instead, it keeps the same content that was loaded with the page. I have to push the preview button to refresh the field for each level so it can work. Even doing that, I'm receiving now warning messages (the module version before 24/Jun didn't emitted these warnings):
* warning: Cannot use a scalar value as an array in /var/www/html/sites/all/modules/cck/content.module on line 606.
* warning: reset() [function.reset]: Passed variable is not an array or object in /var/www/html/sites/all/modules/content_taxonomy/content_taxonomy.module on line 281.
In this case, it doesn't matter any other configuration (lineage or deepest term, any or deepest level, etc.); I tried to put the drop box with level 1, but it isn't appearing (I think this is another bug that is not linked with this, though).
Thanks for attention.
Comments
Comment #1
wim leersYou must have configured the "depth" field setting of your content_taxonomy field. It seems something was wrong with my fix for http://drupal.org/node/264789. Reproduced.
Comment #2
wim leersFixed. I made a bad assumption about taxonomy_get_tree(). That's what you get when you've been "out" for more than a month.
Comment #3
Vuds commentedStill got that too in the last version (25/Jun 9AM).
Now it appears that is just when I try to edit a node. Creating is perfect.
Still appearing the same warnings when pressing the preview button.
You had commented about the depth, I had set to 3 in the 3-level taxonomy field.
Thanks!
Comment #4
Vuds commentedWarnings trying to save a edited node after 2 preview buttons pressed to renew the 2 sub-levels:
* warning: Cannot use a scalar value as an array in /var/www/html/sites/all/modules/cck/content.module on line 606.
* warning: reset() [function.reset]: Passed variable is not an array or object in /var/www/html/sites/all/modules/content_taxonomy/content_taxonomy.module on line 281.
* warning: Cannot use a scalar value as an array in /var/www/html/sites/all/modules/cck/content.module on line 606.
* warning: reset() [function.reset]: Passed variable is not an array or object in /var/www/html/sites/all/modules/content_taxonomy/content_taxonomy.module on line 281.
It's not saving the new content for the field neither keeping the old content, the field becames empty.
Comment #5
wim leersYou're sure you've got the save option set to "tag"?
/me curses at content_taxonomy.module
Comment #6
Vuds commentedI'm saving it as both... Any problem here?
Comment #7
wim leersYep, it turns out to not work quite right. Please set it to "tag" for a moment and test again.
FYI: this is why I curse at the content_taxonomy module. It's a buggy, badly commented piece of code.
Comment #8
Vuds commentedNo, nothing done yet. Putted only as tag saving as requested.
The fields in my tests forms had empty because of the error. Now when I go editing a node, the field starts clean (just with the inside label). I choose one value, AJAX tries to reload, when finished the sublevels dropdowns don't appear anymore. Then I go to preview form button, got the same warning messages, but sublevels appears. If I select a 2nd-level different value than the first, again AJAX tries to reload 3rd-level, but it keeps bringing the values referent to the first 2nd-level, not the chosen last. Preview again, more warning messages, bring the correct list for 3rd-level. Save it, receive more warning messages as #4, but still empty.
Speaking of saving mode, I was going to ask why the value stills 0 in the cck node table... but I think I understood with your explanation.
Comment #9
Vuds commentedIn a fresh new cck node of a fresh new cck content type (but the same 3-level vocabulary):
warning: reset() [function.reset]: Passed variable is not an array or object in /var/www/html/sites/all/modules/content_taxonomy/content_taxonomy.module on line 281.
when saving the form; In this case, AJAX is working perfectly; but it's not saving any data anyway, in any configuration. :/
PS: I don't know if it helps, but this vocabulary isn't 3-level constantly; I can have choices that have 1st, 2nd or 3rd levels of depth. Even knowing that, saving a 1st, 2nd or 3rd depth field value brings me the bug, considering lineage or not.
Comment #10
wim leersPlease post your HS config. Go to admin/settings/hierarchical_select/configs and export the appropriate config, then copy/paste it here.
Comment #11
Vuds commentedConfig:
Other useful information:
Comment #12
autonetex commentedI have the same symptoms:
warning: reset(): Passed variable is not an array or object in /var/www/vhosts/httpdocs/modules/content_taxonomy/content_taxonomy.module on line 281.
error
and the value is not saving after node submit.
Comment #13
wim leersYou've got save_lineage enabled, but is the "multiple values" setting enabled for that field?
Comment #14
Vuds commentedNo, that was not set because I was wanting to have only one of each 3-level term (1 lineage only, let's say).
But, because you asked, I tried then to test with "multiple values" enabled. So:
- In the first content type that I was using, it appeared the dropbox (but I had not configured that). Tried to select any value from 1st level, but again did not reloaded and showed the 2nd level. Tried to "add" to the dropbox, it didn't. Preview button, same warnings, brought me the 2nd and 3rd levels. Selected any different value in 2nd level, it didn't actualized the 3rd item. Tried to "add", it didn't. Again preview button, same warnings, 3rd level actualized. Tried to "add", nothing. Tried to send the form, same warnings as #4, value is empty. (this form have others non-HS content taxonomy fields; and it's a bio node).
- In the content type that I created to test (mentioned on #9), it also appeared the dropbox (and I also had not configured that). But here it's working perfectly; I'm just concerned to the point that with multiple select it's permitted to add more than 1 lineage. It saved, and then I could also return to edit it normally. This form doesn't have others content taxonomy fields YET, I'll put some to test again and verify if it happens the same as above. also, this not a bio node, but i'll try to elect it as one and test it too.
Comment #15
Vuds commentedOkay, I've tested more and now I can refine:
- Without multiple select, the content type brings me the dropbox even if I had not configured it, sending the form gives me all the same warnings as before; but, the unexplainable happened, the ajax loading sublevels are now working perfectly (code or variables junk on the older form? I don't know... but I cleaned the cache repeatedly times, deleted all content nodes of this type and tried recreate them, and it stills not working as the new content type);
- With multiple select, it still brings me the dropbox without any configuration about, but it's working perfectly, for adding and for editing. Additionally, if I send the form with no value inside (and I had not marked as required), I have the same warnings as above. And it causes me another problem; I want one lineage only to be save!
Now I'll try to gave the same look-like for the new form as the older was, I'll put all the other fields that I had in there and test one by one, if I got any news, I return to post here...
Thanks for attention!
Comment #16
wim leersMan, this is weird! I reproduced the dropbox issue.
Comment #17
wim leersFixed, try again with the newest version.
It was just a bad assumption in the code, I was effectively enforcing the dropbox when "multiple values" was enabled.
Comment #18
Vuds commentedI found it!
The problem happens when we have the HS field inside a field group!
Comment #19
wim leersUhm… and that has been fixed. You're not using the latest version of the code then. You must do a CVS checkout, the tarball only updates every x hours…
Comment #20
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #21
jdotti commentedHi,
Sorry to re-open this issu ...
I am using the last version of content_taxonomy and HS but a still have this message :
Passed variable is not an array or object in sites\all\modules\content_taxonomy\content_taxonomy.module on line 281
JD