- Posts: 1
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- [SOLVED] joomla sef & k2 download attachments error 404
[SOLVED] joomla sef & k2 download attachments error 404
- stathis poularakis
-
Topic Author
- Offline
- New Member
I have uploaded some attachment files but when i click ''download attachment'' i get the error 404-not found.
I have read that this is a known issue with sh404SEF and K2.
But i m not using sh404SEF, only joomla seo settings in global cofinguration. Does any one know any solution to this proble ....? thx
Please Log in or Create an account to join the conversation.
- Marcio
-
- Offline
- New Member
- Posts: 2
Thanks
Please Log in or Create an account to join the conversation.
- CSN2011
-
- Offline
- New Member
- Posts: 19
I am using Joomla! V1.7.3 and K2 V2.5.1.
The attachment link works fine in the administration area, but not on the website.
Any solutions?
Please Log in or Create an account to join the conversation.
- İsmail Kuzucu
-
- Offline
- New Member
- Posts: 1
Seo seems linked to the setting as follows.
www.sitename.com/cate/item/download/4.html
Joomla version: 1.7.3
K2 version: 2.5.4
How can we fix the problem.
Thanks
Please Log in or Create an account to join the conversation.
- Anthony Martin
-
- Offline
- New Member
- Posts: 2
looks like this issue has been alive a while in various different posts across the site. Has anyone found a fix for it yet?
I've seen a thread saying that the downloads fail because of SH404, but that doens't seem to be true, the URL's fail even before SH404 takes control of the URL as K2 seems to be outputting the wrong URL in the first place.
from the backend this works fine and will access the download...
/administrator/index.php?option=com_k2&view=item&task=download&id=39_1eba6e274678040bad2ad3e82eac287a
in the front end, the K2 component creates this: /index.php?option=com_k2&view=item&task=download&id=39
Which is blatantly missing the "_1eba6e274678040bad2ad3e82eac287a" part.
As soon as I add these parts back together in th efront end the download works, so how / where do I change the output of the item in the front end to add this extra file information?
Please Log in or Create an account to join the conversation.
- Anthony Martin
-
- Offline
- New Member
- Posts: 2
It's not just the core template files within the K2 Component folder you need to worry about. There are also the overrides within the Core Joomla Template which force K2 to display in the way the site template designers intended - this is most likely that part which is still broken after you change the code Make sure you change the lines in the files within Templates / (Your Template Name) / Com_K2 / Default
To fix mine I just copied the entire directory from another template on another site I knew was working over the top of this folder.
Please Log in or Create an account to join the conversation.
- Pavel Kouřil
-
- Offline
- New Member
- Posts: 1
Please Log in or Create an account to join the conversation.
- Novalee
-
- Offline
- Junior Member
- Posts: 26
Thanks in advance!
Please Log in or Create an account to join the conversation.
- Michelangelo Consiglio
-
- Offline
- New Member
- Posts: 1
,
I've had the same problem with a joomla 2.5 and K2 2.5 site.
As you suggested I checked and changed the template files.
My error was in the file item.php in the templates/[template name]/html/com_k2/templates/default directory.
I took the original row and changed the one in the template version.
My uncorrect row was:
<a title="<?php echo htmlentities($attachment->titleAttribute, ENT_QUOTES, 'UTF-8'); ?>" href="<?php echo JRoute::_('index.php?option=com_k2&view=item&task=download&id='.$attachment->id); ?>">
changed with the original
<a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo $attachment->link; ?>"> (line 376 - K2 ver. 2.5.7)
Please Log in or Create an account to join the conversation.
- GFX
-
- Offline
- New Member
- Posts: 1
Its also word with me.
:)
Please Log in or Create an account to join the conversation.
- evi
-
- Offline
- New Member
- Posts: 3
Thanks in advance!
I disable SEF... but that is not a soloution!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Simply add ?template=system to your URL and check if it works with the default template.
If it does you should download K2's latest verion. Open item.php and transfer the newer attachments code to your template.
This post will help you locate the files you need to edit.
nuevvo.com/blog/item/84-k2-inheritance-sub-templating
Please Log in or Create an account to join the conversation.
- evi
-
- Offline
- New Member
- Posts: 3
Components--> K2--> Parametrs --> Advanced Tab --> And
Enforce SEF URL character replacement NO
Thanks!
Please Log in or Create an account to join the conversation.
- maxpa
-
- Offline
- New Member
- Posts: 1
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- [SOLVED] joomla sef & k2 download attachments error 404