gallery plugin displaydownload - wrong link in plugin

Phoca Gallery - image gallery extension
User avatar
hmayer1980
Phoca Enthusiast
Phoca Enthusiast
Posts: 63
Joined: 19 Oct 2008, 01:05
Contact:

gallery plugin displaydownload - wrong link in plugin

Post by hmayer1980 »

Hi,

I use gallery 4.1 and gallery plugin.

Recently I changed the gallery configuration from "Show Download icon" from "Display (direct download)" to "Display". I am not sure if it is related to the change.

In the Categories View of the Gallery the Download Icon works as expected.
But if I show the Category in an Article where DisplayDownload is enabled the download Icon does not work - the link is different.

For example
- The Category (https://www.hmayer.net/index.php/bildga ... 9-fotobook)
- The Article Using the Category (https://www.hmayer.net/index.php/home/t ... schau-2014)

The Plugin Code in the Article is

Code: Select all

{phocagallery view=category|categoryid=1369|displayname=1|displaydetail=1|displaydownload=1|displaydescription=1|displaybuttons=0}
As you can see the download link in the caregory works but in the Article I get an 404 HTTP Error.
The difference in the URL of the download link is the tmpl=component which is missing in the plugin use and there in the category use.

What do I do wrong?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: gallery plugin displaydownload - wrong link in plugin

Post by Jan »

Hi, did you test to set the parameter to value 2:

displaydownload=2

Jan
If you find Phoca extensions useful, please support the project
User avatar
hmayer1980
Phoca Enthusiast
Phoca Enthusiast
Posts: 63
Joined: 19 Oct 2008, 01:05
Contact:

Re: gallery plugin displaydownload - wrong link in plugin

Post by hmayer1980 »

Hi,

I changed the Article plugin code to displaydownload=2, but this did not change anything on the behavior - only the URL which raises the error containts a phocadownload=2.

A Parameter Value 2 is not documented (https://www.phoca.cz/documents/14-phoca- ... ery-plugin), what would it do?

Other Ideas?
Is it a bug or a configuration issue?
The Article (not this one exactly, but others) are many years old. The plugin Code is copied from there - its the same code style since gallery 2.x

EDIT: In the meantime I did change the parameter back to 1
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: gallery plugin displaydownload - wrong link in plugin

Post by Jan »

Hi, the 2 means direct download.

I will test it more - did you create a menu link to phoca gallery (standard or hidden)?

Jan
If you find Phoca extensions useful, please support the project
User avatar
hmayer1980
Phoca Enthusiast
Phoca Enthusiast
Posts: 63
Joined: 19 Oct 2008, 01:05
Contact:

Re: gallery plugin displaydownload - wrong link in plugin

Post by hmayer1980 »

Hi,

I am not a 100% sure what you mean with
did you create a menu link to phoca gallery (standard or hidden)?
.

I do have a Menu link - its https://www.hmayer.net/index.php/bildgalerien and visible (Categories View) as well as a lot of other menue links (Category View).

But the issue does not happen in those views - its fine there. It is just in an Article when referenced by phoca gallery plugin.

SideNote! I did change the site configuration and now use the default Joomla .htaccess file. This results in showing the "Joomla Error Page" instead of the Default 404 apache Error Document.

Thanks for looking into the issue.
Regards
Hannes
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: gallery plugin displaydownload - wrong link in plugin

Post by Jan »

Hi, the component menu link is important even for the plugin ( https://www.phoca.cz/documents/16-joomla ... -in-joomla )

If SEF is enabled, then the plugin link needs to find some component link to create right SEF link.

But if there is some, there should not be any problem.

Only to test the link, what happened when you disable SEF in Global configuration - do you get the same problem?

Do you use Joomla! core SEF or another solutin?

I see here:
https://www.hmayer.net/index.php/home/t ... schau-2014

wrongly craeted links to download :idea:

EDIT, it is:
images/phocagallery/20140619Warschau/thumbs/phoca_thumb_l_IMG_0060.JPG&phocadownload=1


and should be:
menu-link/1-category-name/detail/1-image-name?tmpl=component&detail=0&buttons=0&phocadownload=1

:idea:

Is the code still this one:

Code: Select all

{phocagallery view=category|categoryid=1369|displayname=1|displaydetail=1|displaydownload=1|displaydescription=1|displaybuttons=0}
Does the category 1369 exists? Is it published? Approved? Is it set to public access?

Jan
If you find Phoca extensions useful, please support the project
User avatar
hmayer1980
Phoca Enthusiast
Phoca Enthusiast
Posts: 63
Joined: 19 Oct 2008, 01:05
Contact:

Re: gallery plugin displaydownload - wrong link in plugin

Post by hmayer1980 »

Hi
(I just had written a lot of stuff over a while and now the submit came up with a login again and everything was lost - so sorry that it is not so clearly written again)

For testing purposes I have copied the page to dev.hmayer.net and disabled SEF - no CHANGE!
I use the Joomla SEF plugin. (no other components then phoca... is installed)

The Code is unchanged - as you have it written.
The Category 1369 exists, is published, is authorized and set to public access.
You can view it at https://www.hmayer.net/index.php/bildga ... 9-fotobook
or at https://www.hmayer.net/index.php/bildga ... 9-fotobook which should be the Catgories View reference.
You can now also verify anything without SEF by using https://www.dev.hmayer.net instead of https://www.hmayer.net/.

Once again - I do not know what a component link should be. If its a menu link to a phoca gallery Categories View then yes, that is there, visible and accessible public.

How do we progress?
May I propose...
You register at hmayer.net - let me know your username and then I copy the page fresh to dev.hmayer.net and grant to you for a couple of days administrator access. So you can check out various things yourself? You have to state that you do not delete any pictures (since those are only linked and not copied) but otherwise you could change whatevery you like on dev.hmayer.net since I can recreate it within 2 minutes.

Other proposals?

Hannes

EDIT: As workarround I have crated redirects for all accessed Pages in the form ".JPG&phocadownload=1" to ".JPG?tmpl=compnent&phocadownload=1". Thats why most of them my work now. But I have not done it for this specific link https://www.hmayer.net/images/phocagall ... download=1
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: gallery plugin displaydownload - wrong link in plugin

Post by Jan »

Sent PM
If you find Phoca extensions useful, please support the project
Post Reply