Image Module: undefined variables with missing images

Phoca Gallery modules - modules for Phoca Gallery extension
fawkes
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 30 Mar 2011, 23:29

Image Module: undefined variables with missing images

Post 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?
fawkes
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 30 Mar 2011, 23:29

Re: Image Module: undefined variables with missing images

Post 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?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Image Module: undefined variables with missing images

Post 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
If you find Phoca extensions useful, please support the project
JBMoney
Phoca Member
Phoca Member
Posts: 25
Joined: 14 Dec 2009, 22:51

Re: Image Module: undefined variables with missing images

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Image Module: undefined variables with missing images

Post by Jan »

Hi, which version of module and component you are using?
If you find Phoca extensions useful, please support the project
JBMoney
Phoca Member
Phoca Member
Posts: 25
Joined: 14 Dec 2009, 22:51

Re: Image Module: undefined variables with missing images

Post 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.
JBMoney
Phoca Member
Phoca Member
Posts: 25
Joined: 14 Dec 2009, 22:51

Re: Image Module: undefined variables with missing images

Post by JBMoney »

And Joomla 2.5.1. Any advice?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Image Module: undefined variables with missing images

Post by Jan »

Hi, try to upgrade to 3.1.5 the notice should be fixed.

Jan
If you find Phoca extensions useful, please support the project
JBMoney
Phoca Member
Phoca Member
Posts: 25
Joined: 14 Dec 2009, 22:51

Re: Image Module: undefined variables with missing images

Post 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.
JBMoney
Phoca Member
Phoca Member
Posts: 25
Joined: 14 Dec 2009, 22:51

Re: Image Module: undefined variables with missing images

Post by JBMoney »

Moved this off into proper form.

The Image Module issue is resolved though, thanks.
Post Reply