I have some taxonomy fields that allow multiple selections...
Whenever browse and click update of the file/image these other fields BLANK out.

This is a serious bug.

Comments

neofactor’s picture

Priority: Normal » Critical

I meant to mark this critical.

It is with BOTH multiple select AND single Select. Anything that is in a dropdown. I tested under safari and firefox.
Also... I tested with the taxonomy set to be "tag" and the presets STAY.. so dropdowns seem to be the culprit!

Any ideas?

deciphered’s picture

Priority: Critical » Normal

Bug confirmed.

Priority downgraded, it's not critical as it won't destroy your website, it's just a slight annoyance that you have to re-select the taxonomy after uploading.

neofactor’s picture

true... depends on your website...

One of my taxonomy has 180 options you can select. That makes it rough on the user to have to remember settings.
I will train them to upload image before selecting taxonomy.... will need to make them NOT required in order to do that.

Let me know the area that needs to be tweaked and I will spend some hours on it.

Thanks.

Steve Dondley’s picture

I'm seeing the same behavior.

drewish’s picture

dopry’s picture

Status: Active » Fixed

This should be fixed in HEAD, had to remove the node rebuilding...

neofactor’s picture

Great... when will this be released down as a .version release?
Is HEAD good to go for production sites?

drewish’s picture

Status: Fixed » Active

the fix for this has broken #286834: Only uploads/removes file if required fields are filled out, then wipes all fields

neofactor, you can get HEAD via CVS. we're working with the d.o admins to get the HEAD release packaging again. update: looks like the packaging is working again: http://drupal.org/node/96616

dopry’s picture

Status: Active » Closed (fixed)

reopen #286834. The fix in that patch is wiping data for all other form_altered in fields for a node... rolling that patch back solve this issue, and is still function on all but validation errors... which with formAPI's workflow is technically by design behavior even if it is annoying...

the node_form_submit_build_node only seemd necessary on JS callbacks, not normal submit callbacks and isn't well documented.

neofactor’s picture

Title: Uploading Image wipes MultiSelect field! » Uploading Image wipes MultiSelect field!

10-4

I will follow along over at: http://drupal.org/node/286834

NimrodYonatanBenNes’s picture

Version: 6.x-3.x-dev » 6.x-3.0-rc1
Status: Closed (fixed) » Active

Bumping this issue up again cause it still happen at rc1.
To be more precise, whenever I upload an image (which is not the first image) it validate the form automatically and wipes the data from the multiselect taxonomy control field, I don't care about the extra validation but the wiping of data is problematic... at http://drupal.org/node/286834 dopry said that "we need js handlers to fix that.." and that was at August 1, 2008.

or maybe there is a solution for this issue already?

quicksketch’s picture

Could you provide a workflow to reproduce this issue? I tried:

- Create a new node with a FileField and a Taxonomy multiple select field.
- Enter a node title, select an item in the taxonomy field.
- Select a file, clicked "Upload".
- Hit the Preview button
- Clicked "Remove" on the file, clicked Preview again.
- Selected another file, clicked "Upload".
- Clicked "Save" to save the node. The taxonomy field maintained its value through the whole process.

quicksketch’s picture

Title: Uploading Image wipes MultiSelect field! » Uploading Image wipes MultiSelect field
Status: Active » Postponed (maintainer needs more info)
NimrodYonatanBenNes’s picture

Status: Postponed (maintainer needs more info) » Active

sure.

- Create a new content type with FileField & ImageField and set it for unlimited number of images + use Multiselect (http://drupal.org/project/multiselect) & Content Taxonomy for easy selection of taxonomies.
- Enter a node title, select few taxonomy values at the Multiselect box.
- Upload an image file (everything is ok so far).

From this point I found 2 options to reproduce the error:

Option 1:
- Add another image file upload field
- Upload the second image file, which automatically validate the form and erase all of the selected values from the Multiselect box (other fields keep their values).

Option 2:
- Click on the "Remove" button for the first file which also automatically validate the form and erase all of the selected values from the Multiselect box.

By the way I'm running Drupal 6.10.

Thanks & cheers!

quicksketch’s picture

Title: Uploading Image wipes MultiSelect field » Uploading though FileField wipes MultiSelect field

Ugh. I thought you meant normal taxonomy, not some crazy Multiselect thing. Does the field maintain its values when you use other AHAH behaviors like the CCK "Add other item" or Upload module?

NimrodYonatanBenNes’s picture

Title: Uploading though FileField wipes MultiSelect field » Uploading Image wipes MultiSelect field

Tried it with the Upload module and it does the same thing so I guess the solution should be implemented at the Multiselect module.. I think I'll try to patch it myself, can u direct me to what should I look for? whats causing the problem?

quicksketch’s picture

Project: FileField » Multiselect
Version: 6.x-3.0-rc1 » 6.x-1.2

I've never used Multiselect module before, so I'm not really able to give much information on how it's working or what's going wrong. My guess is that the module doesn't actually update the "real" form element on the page as the choices are made, so when an upload or some other AHAH behavior happens, the value isn't submitted properly.

attheshow’s picture

Title: Uploading Image wipes MultiSelect field » Uploading Image wipes Multiselect field
Status: Active » Postponed (maintainer needs more info)

I'm not able to replicate this I've tried adding and removing images, saving the node, and then coming back and editing the images again. Everything seems to be working as it should.

NimrodYonatanBenNes’s picture

Priority: Normal » Minor
Status: Postponed (maintainer needs more info) » Postponed

I checked the issue again with a fresh system and it doesn't reappear so apparently it's something at my system... what is it? I don't have a clue... I'll post the conclusion here when I'll find it (if I will ;))

Thanks a lot anyway

NimrodYonatanBenNes’s picture

Status: Postponed » Closed (fixed)

OK I found the elusive problem (which is connected to Drupal core I guess and not here...) after it re appeared in a fresh installation.

At my system I use 2 themes, the first one is Garland which is used as my admin theme (also checked the "Use administration theme for content editing"), the second one is a unique theme for the site that I create.

Now, the second theme got a template.php file which among of its functions it got this override function:

function phptemplate_button($element) {
  // Make sure not to overwrite classes.
  if (isset($element['#attributes']['class'])) {
    $element['#attributes']['class'] = 'form-'. $element['#button_type'] .' '. $element['#attributes']['class'];
  }
  else {
    $element['#attributes']['class'] = 'form-'. $element['#button_type'];
  }

  //return '<input type="submit" '. (empty($element['#name']) ? '' : 'name="'. $element['#name'] .'" ') .'id="'. $element['#id'] .'" value="'. check_plain($element['#value']) .'" '. drupal_attributes($element['#attributes']) ." />\n";
  return "<p><button type='submit'>".check_plain($element['#value'])."</button></p>";
}

This function modified from some reason the button of the file uploading at the node creation form which reside at the Garland theme! I don't have a clue why and I intend to submit a bug about it after I'll have the time to recheck it with a totally fresh system.

Anyway that was the problem.. thx for helping out and cheers!