Closed (fixed)
Project:
Image
Version:
4.6.x-1.x-dev
Component:
image.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2005 at 17:06 UTC
Updated:
25 Jun 2005 at 22:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
Robrecht Jacques commentedIf you don't have an empty gallery, and you go to it's page (
image/tid/XXX) then nothing will be shown! Probably becauseimage_pagereturns an empty string in this case.An easy fix is attached.
Another way of correcting this, is making sure that
$gallery->latestinimage_pageis only set when there is actually an image in the gallery (or subgalleries).I think however there is also a small problem in
includes/image.incin drupal-core. Whatimage_get_infodoes is checking whether the file exists, but it should also check if the file is in fact a real file and not a directory. That is what is causing the error to appear. Of courseimage.moduleshouldn't ask for this info in the first place (it is asking the info of thefilesdirectory btw).Robrecht
Comment #2
syscrusher commentedI can replicate this error, and I have also verified that the patch from robrechtj fixes it on my sites. +1 for the patch. :-)
Scott
Comment #3
CdnStrangequark commentedSorry for the delay in responding.
I tried to apply the patch but it fails everytime. It may be because I already applied the Mozilla browser patch. It seems you can't patch something twice.
Comment #4
Robrecht Jacques commentedWell, patching something twice sometimes (most of the time) works as long as the lines you are patching are not the same.
Maybe you can apply the patch manually. In "function theme_image_gallery" you need to insert a "if ($gallery->count) {...}" at the right place. I hope it is clear from the patch which line you need to change.
Kr,
Robrecht
Comment #5
walkah commentedcommitted - thanks :)
Comment #6
(not verified) commented