Javascript issue with file uploads and uc_nodetype

Posts: 37
Joined: 11/28/2007

I've posted about this issue before and am now offering a $200 bounty to anyone who can solve it. If you have time to also to clean up the uc_nodetype module and get it ready to be contributed, then I will add $100.

Here's the issue:

I'm stuck when it comes to integrating uploads on an add node form on the checkout page. Using uc_nodetype, I have been able to insert the nodetype_node_add form onto checkout pages as a pane and then ultimately create nodes when a checkout is complete.

However, I cannot get any of the image uploaders to actually save images or files with a new node. I have tried CCK image, Image, adding an image as an attachment. With CCK image, when I select an image to upload and press "Upload", the whole page refreshes. Similarly, when uploading a file, when I press "Attach", the file doesn't attach.

The fact that the entire page refreshes instead of just an iFrame or div leads me to believe that this is a javscript issue. However, I haven't been able to isolate and solve the problem. I'm keeping my fingers crossed that someone out there in Ubercartland can.

Please let me know if you have any questions. Ideally, this work would be done within the next week or two.

Posts: 5
Joined: 11/29/2007

Julia,

have you explored the possibilities that the directory(s) that the files are going to be uploaded to are: there; have correct permissions; etc? I have had endless permission issues with images.

Also, it is quite normal (afaik) that the page will refresh under an upload operation. Of course, I don't know the specifics of what you're trying to do, vis a vis the integration of several modules here.

Nik

Posts: 37
Joined: 11/28/2007

Hey Nik,

You're everywhere!

I've checked into the permissions issue. In fact, here's what I've tried recently:
- checking upload file directory permissions
- altering the uc_cart_checkout_form to have the attribute multipart/form-data
- not uploading the file or image on the screen but instead seeing if it is saved with the overall submit
- changing the display of the form from drupal_retrieve_form to drupal_get_form or drupal_render_form
- downgrading jQuery back to the base Drupal js version
- banging my head against the wall repeatedly

Julia

Posts: 37
Joined: 11/28/2007

I downloaded Charles, a program that lets you monitor information being sent to the server. What's strange is that the files are being sent in the POST request yet never show up on the page.

I'm attaching part of the printout from Charles in case anyone has some great ideas.

AttachmentSize
Picture 4.png50.35 KB
Posts: 37
Joined: 11/28/2007

Just wanted to note that this problem is solved. Turns out that it was caused by a conflict with OpenAds. I am back to work at the uc_nodetype module.

Posts: 1314
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Congrats on getting it fixed! But that sucks about OpenAds - since I'm going to continue using that once I convert the main site to Drupal. Any idea what the specific conflict was? I have experience with the non-Drupal OpenAds software, maybe I can help narrow it down and fix it.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 37
Joined: 11/28/2007

The problem was that the Drupal OpenAds invocation code that's created as part of the OpenAds module was not working correctly with OpenAds 2.4 But, it wasn't showing an error in Firebug because the problem was with the adserver and not the page. Or, at least that's what I'm guessing.

I changed the Drupal OpenAds invocation js and it seems to be working now with OpenAds 2.4 You can find my patch here:
http://drupal.org/node/219073