Closed (fixed)
Project:
Image
Version:
6.x-1.x-dev
Component:
image_attach
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2008 at 13:18 UTC
Updated:
10 Dec 2008 at 22:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
imkatie1 commentedThank you so much! It works!!!!!!!!!!!!!!!
Comment #2
merlinofchaos commentedA quick note: Make sure image_attach.module does not include image_attach.views.inc on its own -- Views will include this.
Comment #3
imkatie1 commentedI used this patch yesterday and it perfectly worked.
But when I make a view showing node title and attached image,
the view shows only the nodes which have an attached image.
So if a node doesn't have an attached image, the node doesn't show up in the view!
At first time I thought it might be a problem of views2.
But no, for other fields such as attached file using upload module this doesn't happen.
for any other fields in views it's ok....
It is a problem only when I use attached image as a field in views2.
I don't no why... help please~~~~~
Comment #4
R.Muilwijk commented@hyunkatie, at the moment the view is using a INNER join. This means it requires the image to exists in the image_attach table. Change the 'INNER' type to 'LEFT' to fix it.
I'll check merlinofchaos his feedback tomorrow and provide a new patch.
Comment #5
merlinofchaos commented2 solutions:
1) just change the join to LEFT and leave it that way
2) change to using a relationship which will have a checkbox.
I'm not sure 2 is optimal here, honestly.
Comment #6
R.Muilwijk commentedSince image attach can't be configured whether or not it is required I changed the join to a 'LEFT'. It ain't included anywhere:
Patch attached with 'LEFT' join.
Comment #7
imkatie1 commented@R.Muilwijk
Thank you so much!!!!!!!!
Comment #8
drewish commentedi couldn't get that patch to apply. looks like the first line with the $id$ might be to blame.
Comment #9
mrfelton commentedsubscribing:- I'd like to know when this patch gets committed.
Comment #10
R.Muilwijk commentedNew working patch is up
Comment #11
R.Muilwijk commentedComment #12
matias.quaglia commentedIt works smoothly to me...
Thanks a lot!
Comment #13
merlinofchaos commentedI have some really really minor comments.
+++ contrib/image_attach/image_attach.views.inc
For me it is always easiest to apply patches if they are generated from a cvs checkout in the base module directory. That way it's always just a matter of patch -p0 < file.patch -- this is very minor, though.
+ 'type' => 'LEFT',
LEFT is the default and does not need to be explicit. (There is nothing wrong with being explicit, however).
+ $data['image_attach']['table']['group'] = t('Image Attach');
+ 'title' => t('Attached Image'), // The item it appears as on the UI,
Drupal standard for capitalization is now that we capitalize the first word only. So: t('Image attach') and t('Attached image'); -- doing this will create better visual consistency with other Views handlers.
+class image_attach_views_handler_field_iid extends views_handler_field {
It would be polite to comment the class.
Probably the most important thing:
This class seems to be missing the option_definition() function which supplies default settings and informs Views how to export the settings.
Comment #14
R.Muilwijk commented@merlinofchaos, thanks for the review. It's the first thing I made for views 2 so it's nice to hear what you are doing right and wrong. I'll fix the stuff next couple of days and dive into the option_definition part. The reason I don't run patch from CVS is because I quite dislike CVS. Have custom shortcuts for drupal head but not for contrib.
Comment #15
drewish commentedif you can re-roll with fixes for the things merlin pointed out i'll get this committed quickly.
Comment #16
deviantintegral commentedHere is a patch with all of the changes Merlin suggested. I also noticed that no Help was specified for the field, which I've added.
--Andrew
Comment #17
drewish commentedThanks committed to HEAD.
Comment #18
gama10 commentedHi,
I had the same problem with views2 and Image 6.x1.x.alpha3 than discribed at http://drupal.org/node/220295
I copied the patch from this page, which solved the problem - (I got the image attach field) but:
Thumbnails and images are not displayed in view!
Does someone has an idea, whats wrong?
Thanks for your help!
Comment #19
geraldito commented279844_image_attach_views2_2.patch worked smooth and provided a funcitonal image attach field to views module 6.x-2.0-rc1. but after upgrading to version 6.x-2.0-rc2 images disapeared and views module shows an error in Fields definitions. Default: "Error: handler for image_attach > iid doesn't exist!" Page: "Broken/missing handler: Imagen"
Comment #20
aruns4 commentedwhere and how am i to use this patch..
pls say me..
Comment #21
Doomd commentedI am trying to add attached images to a view...but they are nary to be found in this release. Doh well.
Comment #22
schlotterich commentedi got the same problem as geraldito after the new version of views I can't finde the image attach field in views anymore
Comment #23
EmpireNM commentedI have applied the patch as well, but still don't see any image options in the latest version of Views.
Comment #24
matslats commentedI can't see the attached image appearing as a node field exposed to views either
Comment #25
Hetta commentedduplicate of http://drupal.org/node/220295 ...
Comment #26
geshan commentedDunno why the patch is not working with my installation :-(.
Comment #27
prbass commentedRe-rolled patch against 6.x-dev for the new Views API, as described at http://drupal.org/node/220295 #45
With the briefest of testing, it seems to work okay with the new Views 2.0
Comment #28
asmo75 commentedi have problem
$ patch -p0 < image_attach_279844.patch
patching file contrib/image_attach/image_attach.views.inc
Hunk #1 FAILED at 35.
1 out of 1 hunk FAILED -- saving rejects to file contrib/image_attach/image_a
ch.views.inc.rej
patching file contrib/image_attach/image_attach.module
patching file .project
patching file contrib/image_attach/image_attach_views_handler_field_iid.inc
Comment #29
drewish commentedthanks, committed to HEAD. please report any further bugs as new issues.
Comment #30
-enzo- commentedHello drewish
I get the same message error asmo75 reported, I download the patch file from http://drupal.org/files/issues/image_attach_279844.patch.
Could you provide a link to get a patch with this error fixed please
Best regards
enzo
Comment #31
drewish commented-enzo- once a patch has been committed a new -dev release is created within 12 hours so at this point you can just use the -dev release.
Comment #32
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #33
rayray commentedI have installed the dev version and tested this out. It works, which is nice. I'm using PHP 5 and MySQL 5, and the problem I'm having is performance.
It takes about 15 seconds to render a page showing the 10 newest "recipes" along with their thumbnails! Without the image connection, it takes about 1/4 of a second. So I'm going to have to look at how my database is arranged, but I think this patch might need a bit of work with regards to its performance!
Comment #34
markstos commentedI got this to work by installing the "6.x-1-x" dev version from here:
http://drupal.org/project/image
Then, when editing a View, I could click on the option to add a few field, and new group of options, "Image Attach" appeared, and it contains the attached image field option. After selecting, the image started appearing in the view!
Mark