I have the Fupload set to "one image per node". This gives me the options to set different titles and taxonomy terms for eacht image. I mark a CCK field, a Taxonomy Field and the Node title as "Editable fields". This works so far. I upload the pictures and hit the "next step" button. I come to the page with a lil thumbnail and the title field for each image, but there's no CCK Text field nor a taxonomy field. Instead I get the following error:
warning: Invalid argument supplied for foreach() in /opt/lampp/htdocs/sites/all/modules/image_fupload/includes/images.previewlist.imagefield.inc on line 38.
warning: Invalid argument supplied for foreach() in /opt/lampp/htdocs/sites/all/modules/image_fupload/includes/images.previewlist.imagefield.inc on line 44.
....
Meanwhile I wrote a patch fixing the taxonomy issue. I don't know yet what the problem about line 44 is. It seams the the array['tags'] doesn't exist. In my patch I just catch this error using an if(is_array()) statement.
I also saw in the code the support for CCK is not provided yet :(
| Comment | File | Size | Author |
|---|---|---|---|
| patch_image_fupload.patch | 2.41 KB | rapsli |
Comments
Comment #1
rapsli commentedComment #2
valante commentedLatest installation, I still get the line 44 error, but the taxonomy field displays.
Addition to this bug (I think):
When I create a new content, I get the taxonomy field plus the fupload field. I set the taxonomy as editable. When I go next step, the already existing taxonomy definitions do not show in the taxonomy field, and if I choose them again, I get an SQL error for duplicate key.
The easy correction is to change taxonomy insert to if already exists, don't add.
The better correction is to pre-load the existing taxonomy terms into the next-level field, so that I can add/remove terms from there.
Uses for this: I want to upload 20 images. I want all of them to get term A, and 15 of them to get term B. Before going to next-step, I choose A + B. After going to next-stop, I want to de-select term B for 5 of the images.
I suppose the second correction is more a feature request than a bug, but I would very much appreciate if you can at least include the first correction.
Thanks,
~ Tal
Comment #3
valante commentedOkay, the line 44 issue is caused by the following.
Original lines:
But the taxonomy_form_alter tries to write into $form_taxonomy['taxonomy']['tags'], which doesn't exist. I changed it to:
And now it works fine. Though it doesn't solve the duplicate key issue... I'll keep digging.
~ Tal
Comment #4
trevorjfitz commentedAfter I click "next step" I am unable to edit the taxonomy of each node individually. Is it possible to do that? I am just using the standard image content type.
Comment #5
raphael waeselynck commentedI think the problem is deeper.
Indeed, $form_taxonomy does not have the "tags' key although it is waiting for it. But it will not help to add this key when declaring the array. It should be added by the call to taxonomy_form_alter, but this one stops at its beginning because the variable "taxonomy_override_selector" is set to true. I am investigating still and will share my results as soon as possible.
Best regards,
Raphael
Comment #6
raphael waeselynck commentedOk, found :)
In my case, I enabled another module, hierarchical select, which call set_variable("taxonomy_override_selector", TRUE) on the hook_enable... end of the story for bug identification, I guess, now I'm trying to find out a way to solve this.
Comment #7
skizzo commentedWhy has this been switched to Support Request?
Should it be set back to Bug Report?
Comment #8
dadaisme commentedI also found that Hierachical select caused a problem. When disabling only part of the module, the taxonomy form appear, but not the cck taxo. Disabling all of Hierachical select does not do anything for my cck taxonomy.
Waeselynck raphael, did you fix the problem?