Page 1 of 2

Image Module: undefined variables with missing images

Posted: 11 Oct 2011, 10:11
by fawkes
Hi there,
first off thanks for the great Phoca gallery, I really appreciate all the hard work that has gone into it! I'm using the gallery on my 1.7 installation and it works great. I now wanted to try the "Phoca Gallery Image Module", but that seems not to work at the moment, at least for me; when "Module Type" "default" is configured, it shows the following warning for me:

Code: Select all

Notice: Undefined variable: display_access_category in modules/mod_phocagallery_image/mod_phocagallery_image.php on line 488
16 times

and no images. If I remove the variable as function parameter in that line (I thought I can try, since the function PhocaGalleryAccess::getUserRight called there has a default parameter there anyway), it will show borders for where the images should be, but no images.

When switching to "Mosaic" module type, I get another problem:

Code: Select all

Notice: Undefined variable: imageOrigWidth in modules/mod_phocagallery_image/mod_phocagallery_image.php on line 747
Notice: Undefined variable: imageOrigWidth in modules/mod_phocagallery_image/mod_phocagallery_image.php on line 777
Notice: Undefined variable: imageOrigHeight in modules/mod_phocagallery_image/mod_phocagallery_image.php on line 777
5 times (the number of images configured to be shown)

And also no pictures are shown (haven't tried to fix that case yet, since the problem seems to come from the fact that it doesn't find the images somehow...

Does anybody have an idea what's wrong here? Have I maybe configured the phoca gallery wrong somehow? When using the component itself, though, all images show just fine and I have no problems whatsoever.

In addition, I'd actually like to have pictures of subcategories shown, not only pictures in a category... since I have users adding categories themselves, and I wanted to use this module to show the newest pictures -> so I don't want to choose the subcategory to show the pictures from beforehand, but let them be chosen from the newest subcategory in a main category - is that possible?

Re: Image Module: undefined variables with missing images

Posted: 11 Oct 2011, 10:29
by fawkes
Should've taken a closer look before I posted ;) - it was my fault, I hadn't synchronized the images from my live site to my test site yet, only the database entries :oops: .
Although it might be nice to handle the case of missing images - but in live sites it should be rather rare, so not too much effort should be wasted on that I guess :D .
Now with the images, it works fine (without warnings/notices)! I'd still love to have the latest images of all subcategories in a main category shown, however, instead of the images of only one subcategory... is that possible somehow?

Re: Image Module: undefined variables with missing images

Posted: 17 Oct 2011, 22:18
by Jan
Hi, you can do this with the image module and assign its displaying the to site of gallery component, see the settings of the module to set which images should be displayed. If all the settings do not fit your needs, then you need to customize the code - the sql query.

Jan

Re: Image Module: undefined variables with missing images

Posted: 15 Feb 2012, 19:37
by JBMoney
I'm having this problem too (with Image Module), but my images are where they are supposed to be.

Also, if I go to image manager and recreate thumbnails (for a gallery that already seems to work), after recreating.. no thumbnails and no working link to original.

Do I need to change a directory somewhere?

Undefined variable: display_access_category in G:\wamp\www\bressler_enigma\modules\mod_phocagallery_image\mod_phocagallery_image.php on line 488

Re: Image Module: undefined variables with missing images

Posted: 16 Feb 2012, 01:11
by Jan
Hi, which version of module and component you are using?

Re: Image Module: undefined variables with missing images

Posted: 17 Feb 2012, 16:05
by JBMoney
Sorry, did not get a notice of your reply and missed it for a couple days.

I have Phoca 3.14 & Image Module v3.0.2. If I run the module to show five images I get 55 instances of this error on the page, but the module itself works:
http://dl.dropbox.com/u/2789819/error.jpg

Also, I migrated over from 1.5 and followed your directions. After migration, the galleries work fine but when I recreate a thumbnail on an image, it ceases to work (no thumbnail and the link to the image pulls up nothing) EVEN THOUGH though the DB is still pointing to the same file which is still there.

When I upload an image, i get "Error while saving item". It creates an entry, and uploads the image to the proper directory, but neither the thumbnail or link work.

Re: Image Module: undefined variables with missing images

Posted: 20 Feb 2012, 19:26
by JBMoney
And Joomla 2.5.1. Any advice?

Re: Image Module: undefined variables with missing images

Posted: 21 Feb 2012, 23:49
by Jan
Hi, try to upgrade to 3.1.5 the notice should be fixed.

Jan

Re: Image Module: undefined variables with missing images

Posted: 22 Feb 2012, 01:17
by JBMoney
Thank you, that solved the module issue. However, I still can't recreate thumbnails without completely eliminating the link to the image.

I've gone into the properties of individual images and can confirm that the images are where they are supposed to be, and the record seems to be pointing to the proper file. The category is also pointing to the correct directory.

However, once I recreate the thumbnail... no thumbnail and the link to the image no longer works.... even though, the record still points to the same place and the original images are still there.

I've looked at everything. Is there a PHP setting I might be missing.

Re: Image Module: undefined variables with missing images

Posted: 23 Feb 2012, 20:08
by JBMoney
Moved this off into proper form.

The Image Module issue is resolved though, thanks.