Missing argument 3 for render() in GalleryDerivativeImage.class

xJediXx - April 6, 2007 - 20:57
Project:Gallery
Version:5.x-2.2
Component:Miscellaneous
Category:support request
Priority:critical
Assigned:Unassigned
Status:active
Description

I have installed Drupal 5.1 and embedded Gallery 2 into it using the following tutorials:
http://codex.gallery2.org/Gallery2:How_to_Embed_Gallery2_in_Drupal & http://drupal.galleryembedded.com/index.php?title=Installation

At random when I click on my main Gallery link from Drupal sidebar or if I go to Drupal Admin>Clean URL's or even some other links, I get the following error:

warning: Missing argument 3 for render() in /home/content/I/m/S/ImSpicy/html/gallery2/modules/core/classes/GalleryDerivativeImage.class on line 181.

In addition I often get blank white pages with 2 to 3 Thumbnails on them. No Drupal, no Gallery containers. Clicking refresh gets me to my destination, but why is this happening?

Appreciate any feedback. Thanks

#1

kiz_0987 - April 11, 2007 - 10:30

This is not an issue I've seen, nor does it seem to be an issue with the embed -- instead it seems like an issue with Gallery2 itself. Do you see the same problem standalone? I suggest that you search/post in the Gallery2 forums for help.

#2

kiz_0987 - April 29, 2007 - 12:43

I have now seen this issue on one installation (using PHP5.1 on Mac) but not another (using PHP5.2 on Linux) -- there are other differences though, so it may not be a PHP issue. This is a Gallery2 issue, not a gallery module issue. Please add info to http://gallery.menalto.com/node/62960

#3

SadGeezer - July 16, 2007 - 09:56

I'm not sure it isn't a Gallery Module issue. When I came accross this, I was pulling my hair out looking for a solution then after going it the 'My Account' section of my Drupal site (new installation Drupal 5 in July 2007)I noticed that my username in Drupal wasn't synchronised with the user details in Gallery. I simply changed one of the fields in my account settings (in this case my password) and Gallery and Drupal automatically synched. I've not had the error since.

I'm very new to all this so there may be a better way to fix things, but that simple action seemed to fix the problem for me.

#4

ssdhaliwal - December 4, 2007 - 23:12
Version:5.x-1.x-dev» 5.x-1.0

This happens when ever Gallery is enabled for anonymous user. Once the anonymous user is disabled from viewing Gallery the error disappears. Standalone Gallery does not show this so the issue is between Drupal and Gallery2 integration.

I updated the Drupal module to 2.0 version, still same error (both the gallery blocks) result in errors when access to anonymous user is enabled; if only authenticated users are permitted - everything works like a charm.

r.s
Seraj

#5

Toddv - January 6, 2008 - 18:30

Just wondering if anyone ever figured this out - I'd just as soon be able to have anon users access my gallery (and not sure if prohibiting access actually will eliminate this problem anyway). For me, Gallery seemed to be working fine - and I've used many versions of it for four years now - embedded into a Drupal 5 installation. But once I added some images into posts using Tinymce (not saying that TinyMce has anything to do with the problem) I began to get the "warning: Missing argument 3 for render() in /home/foi/public_html/foi/gallery2/modules/core/classes/GalleryDerivativeImage.class on line 181." error. It takes down the whole site. Refreshes will bring it back but obviously this problem is not something we could have happening at a production site.

I concur that this is a gallery module issue, and not with G2 - I clicked every link with my gallery outside of my Drupal site and I could not get an error.

I also disabled all gallery permissions for unauthenticated users but still get errors.

I can provide whatever installation details that would be useful. G2, gallery module, and Drupal (5x) are all current releases.
Thanks

#6

Toddv - January 7, 2008 - 01:17
Priority:normal» critical
Assigned to:xJediXx» Anonymous

Following up with more detail - installation details on attachment.

In essence,
Using Drupal 5x, Gallery2.2, gallery module = gallery.module,v 1.26.2.32 2007/11/21, and many other modules that I don't think are part of the problem, including TinyMCE.

I get an error where I click on a link - not a gallery link, just a link within my site, and instead of proceeding to the linked data the screen is all white except for one, two, or three gallery thumbnails. Refreshing the browser will bring my site back but I now have the error "warning: Missing argument 3 for render() in /home/foi/public_html/foi/gallery2/modules/core/classes/GalleryDerivativeImage.class on line 181." If I refresh again the error will go away. And clicking the same link that generated the error will not do so again.

In contrast with an earlier post, it does not seem to be affected by permissions at all - I tried various combinations with no result (still got error).

Stand alone gallery works fine.

I have not used the gallery to place many photos at this site hence I have not really had much of an opportunity for a before/after on this but I did notice that this problem seemed to begin after I placed thumbnail images with no link to original in profile nodes (using nodeprofile ). The profile nodes are used on a view page showing our staff so that each person's profile also has their photo.

So, suspicious that the problem is somehow related to these images being place on these profile pages I deleted the photos from the profiles and I deleted the album that contained the profiles from the gallery. Problem seems to be gone. I recreate album, add photos, drop images into profile nodes - problem back though cannot predictably recreate it. If I just click around the site for a while I'll get the error. If I follow my steps and follow the same sequence of links, no problem.

BTW, the one, two, or three thumbnails appearing on the white screen - they are all thumbnails from the same album (I have a dozen or so albums)

However, as I said, I haven't really placed very many images on nodes but from Gallery. I do have half a dozen or so though and don't seem to have a problem. Coincidence? Perhaps...

So key factors seem to be
-node type of place image = profile
-image place by TinyMCE using G2 button. (all my site images have been place that way though, no problems before)
-Images were from the same album
-Images were placed using TinyMCE's option "Fullsized image only - no link (html).
-I take these images away I cannot reproduce the error.

Thanks for any assistance - and thanks for the module, it's been great.

AttachmentSize
Vogel-gallery-issue.txt 1.45 KB

#7

profix898 - January 13, 2008 - 22:45
Title:Gallery2 Embedded into Drupal - GalleryDerivativeImage.class Error - Also posted at Gallery2 Forum» Missing argument 3 for render() in GalleryDerivativeImage.class
Version:5.x-1.0» 5.x-2.x-dev

I never experienced this issue myself ... so please everyone try and find congruences in your setups or the pages where the error occurs. ATM its unlikely to be resolved without some more details.

#8

Toddv - January 15, 2008 - 16:50

Thanks for keeping this active.

Trying to find congruences:
-I've described above how, seemingly at random, a clicked link within my site will lead to a white page with several thumbnail images from the gallery, otherwise the page is blank.

The thumbnails - if I go and delete their original image I believe the problem goes away. A congruence within my site and the problem seems to be the thumbnails, at least one of them is the same each time the problem occurs.

I suspect that somehow there is a problem in the uploaded images that are linked to the thumb, a problem that causes Gallery and/or gallery module to, for lack of a better phrase, stop playing nicely together.

For instance, I followed one of the thumbs back to the original image and discovered that the original was a very small image, 80px x 80px, and wondered if the fact that it was smaller than the gallery's thumbnail setting had anything do to with it. Another time it was a file icon that had accidentally been uploaded as an album item. I wonder if Gallery module or gallery just doesn't know what to do with these situations.
Thank you,
TV

#9

rimbeaux - January 16, 2008 - 04:20

Huh. I had that problem, too. Gallery 2.2 embedded in Drupal 5.5 -- I tracked it down to three images in my gallery. I assume it was because there was a problem dealing with the thumbnails. I removed the images and the problem went away.

Details here: http://gallery.menalto.com/node/72666

Cheers,
-- David

#10

iain_mac - March 19, 2008 - 13:42
Version:5.x-2.x-dev» 5.x-2.2

I am experiencing this issue, I think its linked to the Gallery Grid Block as when I disable that block the problem goes away.

#11

OutCast - April 7, 2008 - 01:46

I had the same problem tonight, I went to my site, and nothing pulled up but 1 gif image, a eagle flying

my home page was crashed so I was able to get to admin but seen this error
warning: Missing argument 3 for render() in /home/*****/public_html/******/gallery2/modules/core/classes/GalleryDerivativeImage.class on line 181.

so after pulling my hair out I deleted this image and everything is fine now,
Now what is scary, am i going to have to worry about someone uploading a gif that will crash the site again?

Can not find what caused it as there are other gifs in there and work fine.

#12

lvthunder - April 7, 2008 - 14:19

Do you still have that picture? If so try uploading it again and see if it still does it.

#13

OutCast - April 24, 2008 - 02:16

Hello Ivthunder, sorry I been away so long.
Yeah when i tried uploading the image my self it did the same thing, crashes the the site, all that shows from the home page is a white screen with just that image in the top left hand corner.
I found somewhere that it maybe cause from gallery not able to get a thumb from the image, So now this is trouble some from what if some one else uploads just the right image it could crash the site!

but been testing other images and will let ya know what I find.

#14

Alex Ndungu - July 4, 2008 - 12:16

I've come across this problem and it is making my client's site virtually unusable. The nature of the application is such that I cannot ignore the bug so I went ahead and dug into the gallery2 code. So far, I have come across an apparent anomally where a particular image (the one causing the problem) is being loaded as an object of type 'GalleryDerivativeImage' instead of 'GalleryPhotoItem'. This causes a problem later when the object is being rendered. The rendering function called is GalleryDerivativeImage::render that expects 3 parameters, but the calling code supplies only two parameters at "GalleryTemplateAdapter.class line 359":

$html = $item->render('HTML', $params);

The correct code to invoke in this would be "GalleryTemplateAdapter.class line 357":

$html = $entity->render('HTML', $item, $params);

I still haven't figured out why:

1. The wrong object is being used to call the function
2. This is happening only when accessing the images from Drupal. No problem is observed from the Standalone Gallery2.

Anyone have a clue?

Alex

#15

profix898 - July 13, 2008 - 14:33

@Alex: Can you please file a bug report against G2 (at sourceforge, prefix the title with "[G2][Embed]"). I never had this problem myself, but the thread shows that there must be a problem. Gallery module does not invoke any rendering code directly, so there must probably be a bug in the embedding code section of G2.

 
 

Drupal is a registered trademark of Dries Buytaert.