Page 1 of 2

detail view URL misformation

Posted: 03 Jun 2009, 23:53
by shtrank
Firstly, thank you for this high quality gallery. It's the best I've used.

Everything works fine, except when I click on a picture in any category for detailed view the URL it forms is:

mysite/&tmpl=component&Itemid=3?option=com_phocagallery&view=categories&Itemid=3

instead of something like this which works:

mysite/index.php?option=com_phocagallery&tmpl=component&view=detail&id=3

The slideshow buttons and download buttons have the same problem.

I'm using version 2.2.3
Where should I look into to fix it?
I couldn't find anyone with this problem.
Could the configuration of the server be causing the problem?

Re: detail view URL misformation

Posted: 04 Jun 2009, 22:16
by caro84g
Hi,

do you access the images via a menu item?

Regards, Carolien

Re: detail view URL misformation

Posted: 05 Jun 2009, 09:30
by shtrank
Yes.
The gallery is accessed through an entry in the main menu with Phoca Gallery Category List Layout.
The category list and the images in the categories display correctly.

Re: detail view URL misformation

Posted: 10 Jun 2009, 13:40
by shtrank
Could the fact that I uploaded the files through ftp instead with install have something to do?
I also had a previous version that began to give the same error after the hosting company moved the server to a new one.

Re: detail view URL misformation

Posted: 10 Jun 2009, 14:49
by caro84g
shtrank wrote:Could the fact that I uploaded the files through ftp instead with install have something to do?
It shouldn't

Have you tried to open the menu-item and save it again?

Do you have the same problem when you create a new menu item?

Regards, Carolien

Re: detail view URL misformation

Posted: 14 Jun 2009, 19:57
by shtrank
Yes, both with new category list and category layout.
I guess the part where the URL string is formed for detail layout (and only for detailed) is broken.
Unfortunately it is difficult for me to read PHP so I couldn't find for sure where the problem might be.
Please tell me where in the source code should I look to try and fix it.

Re: detail view URL misformation

Posted: 22 Jun 2009, 19:08
by shtrank
Please, let me some guidance as to where the problem might be.
Could it be a server related issue?

Re: detail view URL misformation

Posted: 26 Jun 2009, 21:16
by shtrank
I appreciate the big amount of help the gurus of this forum give.
Please let me know if I haven't posed my question and problem right or if you don't answer such questions.
I really think it is a minor bug in the string formation of the url.
I tried it with search engine friendly URLs and there is exactly the same kind of problem.

Re: detail view URL misformation

Posted: 27 Jun 2009, 17:23
by Jan
Hi, such errors got some user one year ago. This error is related to the server (php ?, hosting ?, not correctly installed Joomla! ?, obsolete Joomla! ?) I don't know the reason why, but on some servers the urls were wrong created. As all URLs in Phoca Gallery are created by Joomla! framework, you need to see here, so:

- check your php version
- check your Joomla! version
- check if Joomla! was completely installed on your site
- maybe some wrong htaccess file can do such problems too :idea:

Jan

Re: detail view URL misformation

Posted: 04 Jul 2009, 21:18
by shtrank
Thank you very much for the help.

The problem is solved. Here is the solution taken from:
http://forum.joomla.org/viewtopic.php?p ... a#p1669841

Manually add your full domain to the configuration.php file. Make sure you use a trailing "/".

Then edit the following file:

/libraries/joomla/methods.php

right before line 54:

$uri = &$router->build($url);

Add this:

if (strpos($_SERVER["PHP_SELF"], '/administrator/') === false)
{
$url = $app->getCfg('live_site') . $url;
}


The other solution, which modifies uri.php. Doesn't seems to work for me as the cause for the problem is not ':'.
I use SEF, and it works. Haven't tested it with htaccess.
It seems that this is a rare Joomla bug that springs in many different places.