Hi, I am testing your D7-port on d7-alpha6, and I often get the following warning:
Notice: Undefined index: #object_type in image_dragndrop_uploads_process() (line 59 of C:\Damp\Sites\drupal-7.0-alpha6\sites\all\modules\dragndrop_uploads\modules\image.inc).

CommentFileSizeAuthor
#3 902358.patch1.32 KBjelle_s
#2 902358.patch1.35 KBjelle_s

Comments

pengythai’s picture

I too am getting this problem on the release version.

jelle_s’s picture

StatusFileSize
new1.35 KB

I don't know what "#object_type" is used for, but changing line 59 of both file.inc and image.inc from

'#object_type' => $element['#object_type'],

to

'#object_type' => isset($element['#object_type']) ? $element['#object_type'] : NULL,

seems to fix the problem.

jelle_s’s picture

StatusFileSize
new1.32 KB

sorry, bad patch. Here's the correct one

attiks’s picture

Tried patching but ...

patch -p0 < 902358_0.patch
patching file modules/file.inc
Hunk #1 FAILED at 56.
1 out of 1 hunk FAILED -- saving rejects to file modules/file.inc.rej
patching file modules/image.inc
Hunk #1 FAILED at 56.
1 out of 1 hunk FAILED -- saving rejects to file modules/image.inc.rej

johnv’s picture

subscribe.

sen’s picture

patch succesfull , patched with patch -p1 < 902358.patch

patching file modules/file.inc
Hunk #1 succeeded at 55 (offset -1 lines).
patching file modules/image.inc
Hunk #1 succeeded at 55 (offset -1 lines).

drzraf’s picture

Is the way for the right fix given in #792024: Form error after installing on drupal 7.0-alpha4 ?

linulo’s picture

Got the same error.
Patch worked for me (Drupal 7.7, Chromium on Win XP).
Thank you.

jeffschuler’s picture

The patch in #2 applied for me, (with -p1,) but not the one in #3...

petsagouris’s picture

Status: Active » Needs review
drzraf’s picture

Can anybody explain why it can be NULL ? what is elements expected to contain ?

petsagouris’s picture

In fact, I don't understand what is going on at all in this section of the code.

  • There isn't a field_formatter_image() to be found. It is requested as the theme function but that function is nowhere (not even on google).
  • There is no documentation anywhere to be found on the #object, #object_type and #formatter keys of the element array.

I'd appreciate any explanation from Decipher. I'd love to have this cleared up so that I can continue patching this module.

petsagouris’s picture

Status: Needs review » Needs work
jelle_s’s picture

I'm afraid you're on your own there... His last commit to this module was 1 year ago, I'm not sure if he's even active at all on d.o

jelle_s’s picture

nevermind my previous reply, he made a commit to WYSIWYG Fields one day ago :-)

deciphered’s picture

Hi guys,

I understand the frustration, but my time is extremely limited. It's very hard for me to take time to work on my contrib modules outside of work hours as I am busy raising my 1y.o. as well as trying to get some of my own downtime. As for work hours, I have a very large workload, in the case of the commits to Wysiwyg Fields, this is actually being done on behalf of a client.

Drag'n'Drop Uploads is currently around #4 on my list of contrib module priorities, and it is something that I very much wish to get to, but I can't make any promises on when I will have the time at the moment.

Hold in there.

In the meantime I will try to look at this issue closer over the weekend and get a simple answer so you can continue attempting to work on a patch, but I can't promise.

Cheers,
Deciphered.

deciphered’s picture

Status: Needs work » Fixed

The correct fix for this issue has been committed to 7.x-1.x.

Cheers,
Deciphered.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.