Closed (fixed)
Project:
Dialog
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2011 at 06:14 UTC
Updated:
31 Dec 2013 at 10:50 UTC
Jump to comment: Most recent
Thank you for your work!
I have tried to edit a node with an image field in modal dialog and it doesn't work when I try to modify the image (delete old image and load new one.).
Thank you.
Comments
Comment #1
restyler commentedI confirm the bug.
Steps to reproduce:
1) create a node type, attach image field to this node type
Basically, the image field has "upload" button near the file selector which works via ajax (I'm talking about core field functionality now). So, user can upload the image by clicking "upload" near the file - and gets ajax upload then, or click "save" to save entire node, with file being uploaded in normal way (without ajax)
2) create "edit in dialog" link, implement dialog ajax callbacks for the node type.
try to edit/create the node.
if you upload the file using ajax "Upload" button near file selector, and then click "Save" - the file is saved without any problems.
But! if you click "Save" to save the whole node, the image is not attached to the node, and the image field is empty now.
Comment #2
restyler commentedafter some research I think that the problem is that ajax form submit used by dialog api doesn't handle form uploads well.
So, in my case, I just switched to normal form submit with page reload for this dialog. But I think that file uploads should be handled by dialog api!
Comment #3
andypostProbably you should use ctools_modal_form_wrapper() to handle this correctly
Comment #4
thetoast commentedctools_modal_form_wrapper() won't help. I'm using ctools modal to show a node form with an image upload using ctools_modal_form_wrapper, and I get the same error reported in this comment. Both are possibly related.
Comment #5
lexa.mihu commentedi have the same problem :|
Comment #6
eO_Ae commentedSame problem. Can't find a solution.
Comment #7
eO_Ae commentedThis ended up being a javascript error for me.
I had tried using ctools modal to do this, but ended up trying to do it on my own with jquery.ui and the dialog() method.
My version of drupal was failing to add jquery ui.dialog
I used
drupal_add_library('system', 'ui.dialog')
and it was fixed.
When I was using ctools to try this, I was having a similar problem where I thought jquery.once for drupal 7 was not loading. could be a similar javascript error breaking ctools mid stride.
Comment #8
mustanggb commentedThink this is fixed in the latest dev, please feel free to re-open if this is not the case.