Page 1 of 1

Path problems

Posted: Fri Dec 21, 2012 7:38 pm
by micrology
I have installed Gallery 4.5.0 on a test site. The top level directory for this site is /Users/scs1ng/Sites/Joomla and I have put sample images in /Users/scs1ng/Sites/Joomla/images/photos . The URL for the site is http://127.0.0.1/~scs1ng/Joomla/index.php

First problem: the popup engine is not found because the require statement in agGallery.php (line 285) fails with the error:
[Fri Dec 21 12:49:22 2012] [error] [client 127.0.0.1] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'plugins/content/admirorgallery/admirorgallery/popups/slimbox/index.php' (include_path='.:') in /Users/scs1ng/Sites/Joomla/plugins/content/admirorgallery/admirorgallery/classes/agGallery.php on line 285, referer: http://127.0.0.1/~scs1ng/Joomla/adminis ... edit&id=15

To overcome this, I changed line 285 to require (dirname(dirname(__FILE__)) . DS . 'popups' . DS . $this->params['popupEngine'] . DS . 'index.php');

which avoids the error.

Second problem:

I set the Images Root Folder in Basic Settings to "/images/photos". When I click on the Image Manager tab, I see lots of thumbnail panels, each with a (correct) filename, but the thumbnail images are absent (just containing the 'missing image' icon). So the Admiror gallery is able to find the photo folder (for it is able to read the image file names), but can't create the thumbnail images. The directory /Users/scs1ng/Sites/Joomla/plugins/content/admirorgallery/admirorgallery/thumbs/images/photos exists, but is empty.

Any clues?

Thanks

Re: Path problems

Posted: Sun Dec 23, 2012 1:27 pm
by Vasiljevski
First problem is a bit strange, like relative path is no correct.
Didn't came across this problem so no idea what exactly is the cause of this.
Your should keep in mind that your change may cause problems on live server.

The second problem, seems to me, is linked with the first problem. Relative path problem. Because we use similar path creating for thumbnail path as we do for popup loading, either the path is the problem or permissions.

What server do you use: WAMP, XAMP, EasyPHP.. on your localhost?
Did you install Joomla from scratch or copied existing site?
Did any other extension had similar problems?

Re: Path problems

Posted: Sun Dec 23, 2012 10:50 pm
by micrology
I am using a fresh install of Joomla, and apache2 and MySQL installed as separate entities. I haven't experience any problem with other extensions. However, I did clone the site to another server, with a different files structure. Without my patch, I got the same problem; when I applied the patch, the problem went away.

You write "Your should keep in mind that your change may cause problems on live server. " Why? What problem?

Thanks for your response to my query.

Re: Path problems

Posted: Sun Dec 23, 2012 11:07 pm
by Vasiljevski
Why? What problem?
It's just an assumption :) I didn't mean to say that it will cause a problem, I just wanted to let you know that in case something went wrong on the production server that is the first thing you should look.
But on the other hand, you fix might be a more bulletproof solution than the current one we use :)
Time will tell :)

Re: Path problems

Posted: Thu Feb 21, 2013 9:08 pm
by Vasiljevski
I added your suggestion to the main code, along with credits to you :)

Thank you for your contribution :)