Closed laoneo closed 1 year ago
It should be a redirection, not a download. I think that there's probably a logic inversion in the download() method. Do you want to take a look at it? I and sick, again (yay, having school age children…) and won't be able to debug anything for a few days…
Yes I will have a look, just wanted to confirm that I do not miss something, before I start to dig into the issue.
The problem is that download is always added to the link as you can see here https://github.com/akeeba/release-system/blob/development/component/frontend/tmpl/items/item.php#L40. In my override I'v replaced the line with <?php echo $directLink ? 'download' : ''; ?>
. Then the download attribute is only added when a direct link exists. Would that be the solution?
Ah, yes, that makes sense. I don't use unauthorised links and never caught that. I'll make that change.
I guess you have to apply the change here https://github.com/akeeba/release-system/blob/development/component/frontend/tmpl/items/item.php#L187 and here https://github.com/akeeba/release-system/blob/development/component/frontend/tmpl/items/item.php#L56 as well.
There were another two places. I came up with an even better solution which also works if the item doesn't have a DirectLink e.g. documentation ePub and PDF files.
Nice!
I'm testing the "Show unauthorised links" feature which is actually really nice.
When I enable "Show unauthorised links" on an item and define a link. Then the page of this link is downloaded in the browser when the visitor clicks on the download link of the item. Should the visitor not be redirected to that link instead?