Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi vingborg,
thx for this handy module!
However with todays (May, 21) muploader download from git i have two issues:
- only the last image is saved within the node. The add files area indicates all uploads are fine.
- style presets are not considered and warnings are given (see attached screenshot)
The nodetype configuration is:
- node with one image_field
- image_field with unlimited number
- image_field widget muploader
joerg
Comment | File | Size | Author |
---|---|---|---|
#39 | 1164552-39-make-it-work.diff | 4.85 KB | mavimo |
#30 | mupload-save_all_images-1164552-30.patch | 846 bytes | robertom |
#5 | tentative_weight_killer_1164552_5.patch | 1.83 KB | chx |
Comments
Comment #1
joergM CreditAttribution: joergM commentedhi vingborg,
after some more testing the behavior is:
1. first creation of a node with some uploaded images
- only the first image is saved
- the DB field_data_"my_image_field_name" is missing for the 2nd and the following images,
- the tables file_usage and file_managed are correctly filled with image data
- after manually added entries in field_data_my_"image_field_name" shows everything is fine
2. add some mor images to the node
- all images are saved correctly
- php warning '_weight' missing weight field
hope this helps bugfixing
joerg
Comment #2
JOINSO CreditAttribution: JOINSO commentedHi!
I have the same problems of pixelfraud.
I create a new ContentType with an File field, with unlimited number of values.
I upload several files and only the last image is saved.
Any idea?
Regards!
Comment #3
TripX CreditAttribution: TripX commentedAfter my try, I have the following issues:
- At creation of node, only the first image is saved (edit and upload again is functioning)
- After reuploading some pictures, the node shows me 3 notices:
Notice: Undefined index: preview_image_style in image_field_widget_process() (line 347 .../modules/image/image.field.inc).
Notice: Undefined index: _weight in _field_sort_items_helper() (line 518 .../modules/field/field.module).
Notice: Undefined index: _weight in _field_sort_items_helper() (line 519 .../modules/field/field.module).
Comment #4
Michèle CreditAttribution: Michèle commentedI have the same problem as TripX.
The two _weight notices are repeated per newly updated image.
I had a few more problems as long as the image field was defined as a mandatory field - perhaps this is a hint for vingborg to fix this? Many thanks for your work!
Regards!
Comment #5
chx CreditAttribution: chx commentedI wonder, does this help?
Comment #6
Michèle CreditAttribution: Michèle commentedHi chx
Many thanks for your patch. You are right - it kills the _weight notice and I didn't find any negative side effects. :-)
But the problem that only the last image is saved is remaining.
Here is what I do:
- Create new node (containing an image field with mupload widget).
- Click on "Add files" --> select 5 images --> Start upload --> all seems to be fine
- Save node --> only the last of the 5 images appears (but I can find all five images in my target files directory).
- Click on edit node --> Notice: Undefined index: preview_image_style in image_field_widget_process() (line 346 ../modules/image/image.field.inc).
- Click on "Add files" --> select 5 other images --> Start upload --> all seems to be fine
- Save node --> all 6 images appear - but with the above mentioned notice.
When I click once again on the edit node link, I get this preview_image_style notice as many times as the count of uploaded images.
Could it be the case, that this problem is in conjunction with the colorbox module? (http://drupal.org/project/colorbox). But I have tried to use the colorbox module without the mupload widget and this works perfect...?
Edit: In the meantime I have also tried to use the mupload widget without colorbox and the same errors occur. So I think this has nothing to do with colorbox...
Many thanks to anybody who has a solution for this!
Regards
Michèle
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedModule simply doesn't work. Only last image is saved. On editing a gallery, I get:
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedAfter editing the failed gallery, and then re-adding my images, it works. But there are a lot of errors:
Comment #9
Michèle CreditAttribution: Michèle commented@morningtime: you have to apply the patch of #5 to get rid of the _weight notices.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedOh, thanks, it does work. It's a great module, just need to try twice to get it to work. I use this with the http://drupal.org/project/galleryformatter module to create instant jQuery galleries with Colorbox.
Comment #11
vingborg CreditAttribution: vingborg commentedI have applied the patch by chx, and a lot of stuff seems to have evaporated :-)
All that code was simply not doing anything usefull.
Comment #12
dark11star CreditAttribution: dark11star commentedIs there a fix for the "only last image uploaded" problem? I have the same problem. One note, if I click "preview" and then save, it loads all images.
One other minor issue: WIth Firefox, the add files link does not launch a select browser like it does in IE. Is this a Plupload issue?
Thanks for all the work,
Jason
Comment #13
TripX CreditAttribution: TripX commentedJason,
as mentioned in another issue, this has nothing to do with muploader.
There is a fix for plupload integration module: http://drupal.org/node/1140666#comment-4402928
Comment #14
Michèle CreditAttribution: Michèle commentedHi
I think I have figured out why these notices appear:
Notice: Undefined index: preview_image_style in image_field_widget_process() (line 346 of modules/image/image.field.inc).
It seems that an entry in the field_config_instance is missing, if the minimal drupal profile is installed instead of the standard profile! If you unserialize the content of the "data" field of used image-field, you can see that the element with the key "preview_image_style" and the value "thumbnail" is missing inside of data['widget']['settings'].
After manually inserting this array element in the database, all these notices disappeared!
(I used the following code
to get the updated serialized string and updated the database manually.)
Regards, Michèle
Comment #15
Anonymous (not verified) CreditAttribution: Anonymous commentedThe original problem is not fixed? Still only the last image is saved. (Only fails the first time, the second time you re-open and re-save the node, then it does work, as I described earlier.)
@TripX, the link you posted has a fix from April, but this thread started in May. I don't think your link has the solution to this problem (only last image saved).
@vingborg the patch you applied was not for the original problem? Still only last image is saved for new nodes.
Comment #16
Michèle CreditAttribution: Michèle commentedHi morningtime
No, I do not think that the original problem is fixed - on my installation, the problem is remaining.
The patch which was linked by TripX only saves the problem "You must at least upload one file."...
Regards, Michèle
Comment #17
dark11star CreditAttribution: dark11star commentedThe patch from #13 worked for me. It now uploads all files.
Comment #18
mdorman CreditAttribution: mdorman commentedGoing to the link in #13 and applying the patch from #7 there fixed this for me. Also the chx patch fixed the weight problem as well.
Comment #19
monican CreditAttribution: monican commentedI have the same issue (only last image saved to node), but looking in the folder that images are uploaded to, all images are in fact uploaded, they just aren't attached to the node. Unfortunately re-saving the node did not work for me. I just keep getting the same issue. I'm also using colorbox and Gallery formatter.
My errors messages are different though and refer to plupload, so I posted over there as well http://drupal.org/node/1121070:
"Warning: unlink(C:\wamp\tmp\php41E1.tmp) [function.unlink]: Permission denied in plupload_handle_uploads() (line 345 of C:\wamp\www\campe\sites\all\modules\plupload\plupload.module)."
"Warning: Parameter 1 to imagecache_profiles_file_validate() expected to be a reference, value given in module_invoke_all() (line 819 of C:\wamp\www\campe\includes\module.inc)"
"Warning: implode() [function.implode]: Invalid arguments passed in form_error() (line 1593 of C:\wamp\www\campe\includes\form.inc)."
Thanks for your work on this vingborg! Its a fabulous module, and if I were any good at code I would try to help de-bug, but I'm willing to help any other way I can :)
Comment #20
JOINSO CreditAttribution: JOINSO commentedI applied the patch from #13 and it doesn't work for me.
Also i get this erros when i go to media tab:
PHP Fatal error: Cannot access empty property in MY_SITE/modules/field/field.attach.inc on line 677, referer: http://MY_SITE/node/92
PHP Fatal error: Cannot access empty property in MY_SITE/modules/field/field.attach.inc on line 677, referer: http://MY_SITE/node/92
Perhaps is related to the not uploaded file....
Regards!
Comment #21
JOINSO CreditAttribution: JOINSO commentedMore info.....
The file are upload correctly, but only one file is displayed when editing the node.....
Any idea?
Regards!
Comment #22
Pavlos-1 CreditAttribution: Pavlos-1 commentedHas anyone found a solution to this problem?
Comment #23
TripX CreditAttribution: TripX commentedActually no progress. The developer told me today that in the next couple of days there will be fixes for the actual problems.
Comment #24
Pavlos-1 CreditAttribution: Pavlos-1 commentedStill nothing? :(
Comment #25
rv0 CreditAttribution: rv0 commentedsub
Comment #26
joergM CreditAttribution: joergM commentedsubscribing
Comment #27
mat. CreditAttribution: mat. commentedsub
Comment #28
daco CreditAttribution: daco commentedsub
Comment #29
derMatze CreditAttribution: derMatze commentedsubscribing
Comment #30
robertom CreditAttribution: robertom commentedthis module is amazing ;)
I would attach a proposed patch for this issue
Comment #31
Frederic wbase CreditAttribution: Frederic wbase commentedI have tested the patch from #30 and it works great!
Thanks for your work m8!
Comment #32
attiks CreditAttribution: attiks commented#30 works like a charm
Comment #33
rv0 CreditAttribution: rv0 commentedyeah #30 rocks
can't believe it's that simple :)
RTBC: This should be committed and made into an official project imo... Where is vingborg?
Comment #34
Danny EnglanderThe patch in #30 worked in combination with http://drupal.org/node/1140666#comment-4402928
Comment #35
Pocketpain CreditAttribution: Pocketpain commentedThanks #30!
Comment #36
sachbearbeiter CreditAttribution: sachbearbeiter commentedsubscribe
Comment #37
pio.fernandes CreditAttribution: pio.fernandes commentedThanks #30!!!
Comment #38
Frederic wbase CreditAttribution: Frederic wbase commentedvingborg? Commit to dev release?
Comment #39
mavimo CreditAttribution: mavimo commented@all: patch into attachment is a collection of patch available on some different issues. It work fine with:
If anyone can test and confirm...
@vingborg: Thanks for your work! I think you can change this sandbox to a project. if you require some help on maintenance/test/.. please ask me ;)
Comment #40
Frederic wbase CreditAttribution: Frederic wbase commented@mavimo, i will test it in my next project, and post some feedback here. Thanks for your work :-)
Comment #41
EvanDonovan CreditAttribution: EvanDonovan commentedIt looks like #5 was committed to the repository; I am not sure about #39 - what is contained in it?
Comment #42
rv0 CreditAttribution: rv0 commentedand a better question: Where is vingborg?
Comment #43
tomasbedrich CreditAttribution: tomasbedrich commentedConfirming: #39 works GREAT! Big thank to you @mavimo!
Just copy master from GIT and than apply patch #39.
Comment #44
mavimo CreditAttribution: mavimo commented@ricoo tks :)
@vingborg: can I help you on mantain/improve this project? Can you let me know if is it possibile?
Comment #45
robertom CreditAttribution: robertom commentedI'm wondering why this bug is marked as closed(fixed)... the patch isn't on git repository.
I reset this issues as RTBC (for patch #30)
@mavimo: I definitely will review your patch, but I think is better don't make a bulk patch...
#39 is splitted as:
#30 of #1164552: image upload: only the last image is save
#5 of #1182760: Respect Weights
#1 of #1313046: Add Insert support
and:
@mavimo what is the issue number of the last snippet of code? I haven't found it...
EDIT:
Ok... I've found it:
#12 of #1219854: When deleting image previously uploaded through widget, all other images are deleted
Comment #46
mavimo CreditAttribution: mavimo commented@robertom: I mixed all patches becouse each single patch don't solve the problem without the other and some patch override some change on other. There's a list of step to do to have a working module, but it's also usefull for users have a "single" operation to do, without search all issue and apply each patch.
Thanks to report each issue/patch.
Ciao :)