Keyword

Attachments not working...cant download..

  • Ben Koren
  • Ben Koren's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 11 months ago #128562 by Ben Koren
Hello,
i have the latest version of k2 and using Joomla 3.3.0 (latest)
i have custom override item.php page stored in the template-name/HTML folder..

and the Attachments not working...cant download, get 404 error page when clicking on download link..

this is my item page link
minaweb.co.il/gkb/%D7%92-%D7%95-%D7%A4%D7%AA%D7%A8%D7%95%D7%A0%D7%95%D7%AA-%D7%90%D7%91%D7%98%D7%97%D7%94/%D7%9E%D7%95%D7%A6%D7%A8%D7%99%D7%9D/%D7%9E%D7%A6%D7%9C%D7%9E%D7%95%D7%AA-%D7%90%D7%A0%D7%9C%D7%95%D7%92%D7%99%D7%95%D7%AA/%D7%9B%D7%99%D7%A4%D7%94/11-%D7%9B%D7%99%D7%A4%D7%94/%D7%9E%D7%A6%D7%9C%D7%9E%D7%AA-%D7%9B%D7%99%D7%A4%D7%94-%D7%93%D7%92%D7%9D-3902-1

i tied few solution in this links with no success
www.itoctopus.com/404-error-when-trying-to-download-a-k2-attachment
getk2.org/community/English-K2-Community/160736-Attachment-Problem

please advice ?

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #128563 by Lefteris
Replied by Lefteris on topic Re: Attachments not working...cant download..
Hi. Look at how the default item.php is printing the attachment download link and update your overrides.

Please Log in or Create an account to join the conversation.

  • Ben Koren
  • Ben Koren's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 11 months ago #128564 by Ben Koren
Replied by Ben Koren on topic Re: Attachments not working...cant download..
what ?

its the same code... the same in my new item.php and the original item.php...
Log in  or Create an account to join the conversation.

More
10 years 11 months ago #128565 by Lefteris
Replied by Lefteris on topic Re: Attachments not working...cant download..
Do you have any SEF extension installed? Grab and install the K2 development version from getk2.org/assets/get . Let me know if your issue is solved.

Please Log in or Create an account to join the conversation.

  • Ben Koren
  • Ben Koren's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 11 months ago #128566 by Ben Koren
Replied by Ben Koren on topic Re: Attachments not working...cant download..
i only using the Joomla 3 SEF from global configuration..
made the .htaccess
Use URL rewriting YES
Search Engine Friendly URLs YES
Unicode Aliases YES

you want me to install the DEV version on the site? just install on the older version from extension manager ?

i moved the site to root domain to see if problem solved... but still the download not working...


www.gkb.co.il/%D7%92-%D7%95-%D7%A4%D7%AA%D7%A8%D7%95%D7%A0%D7%95%D7%AA-%D7%90%D7%91%D7%98%D7%97%D7%94/%D7%9E%D7%95%D7%A6%D7%A8%D7%99%D7%9D/%D7%9E%D7%A6%D7%9C%D7%9E%D7%95%D7%AA-%D7%90%D7%A0%D7%9C%D7%95%D7%92%D7%99%D7%95%D7%AA/%D7%9B%D7%99%D7%A4%D7%94/11-%D7%9B%D7%99%D7%A4%D7%94/%D7%9E%D7%A6%D7%9C%D7%9E%D7%AA-%D7%9B%D7%99%D7%A4%D7%94-%D7%93%D7%92%D7%9D-3902-2

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #128567 by Lefteris
Replied by Lefteris on topic Re: Attachments not working...cant download..
Yes you can install the developement version. Don't uninstall first. Uninstalling K2 will delete all your items. Can you also try to download the attachments from the administration area? Is the download working there?

Please Log in or Create an account to join the conversation.

  • Ben Koren
  • Ben Koren's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 11 months ago #128568 by Ben Koren
Replied by Ben Koren on topic Re: Attachments not working...cant download..
yes its working good from the admin k2 panel

ok i will backup and install the dev version you sent me.

Please Log in or Create an account to join the conversation.

  • Ben Koren
  • Ben Koren's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 11 months ago - 10 years 11 months ago #128569 by Ben Koren
Replied by Ben Koren on topic Re: Attachments not working...cant download..
ok the new dev version installed and yet its still not working

but it is working when i turn off the joomla SEF from global configuration
search Engine Friendly URLs NO
Use URL rewriting NO
Adds Suffix to URL NO

www.gkb.co.il/index.php?option=com_k2&view=item&id=79:%D7%9E%D7%A6%D7%9C%D7%9E%D7%AA-%D7%9B%D7%99%D7%A4%D7%94-%D7%93%D7%92%D7%9D-3902-2&Itemid=205

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #128570 by Lefteris
Replied by Lefteris on topic Re: Attachments not working...cant download..
I think this has to do with RTL support in the URLs. Try to enable SEF again and try to set temporarily the alias of the item and the category to latin characters.

Please Log in or Create an account to join the conversation.

  • Ben Koren
  • Ben Koren's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 11 months ago #128571 by Ben Koren
Replied by Ben Koren on topic Re: Attachments not working...cant download..
ok its working now, i turn on all the joomla SEF options from global configuration and played with the setting of the K2 Advanced SEF Settings

i don't know exactly what i turn on or off but now its working!

i'm attaching image of my k2 Advanced SEF Settings

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #128572 by Lefteris
Replied by Lefteris on topic Re: Attachments not working...cant download..
Glad that you solved. Let me know if you face more issues.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago - 10 years 7 months ago #128573 by Pedro Henrique
Replied by Pedro Henrique on topic Re: Attachments not working...cant download..
The Problem is in K2 attachment SEF URLs parser and/or generator. If you enable the "Category id and title alias separator", the Download URLs must be yourdomain.com/menu-alias/ID-CATEGORY-ALIAS/download/id_hash (Like www.domain.com/menu-alias/10-category-alias/download/20_9e847hfurh4449589302dd89). But K2 is not generating SEF URL well in this case, it is generating www.domain.com/menu-alias/download/20_9e847hfurh4449589302dd89 (without the id and category alias separator that you enabled in K2 SEF advanced configuration). When you click it, K2 don´t understand the link and throw a 404 error.

I made a workaround code for that, to force append the category id and category alias separator to the URL. You have to include this code in category_file.php and item.php K2 template files (this way we don´t hack K2 core files):
Log in  or Create an account to join the conversation.

More
10 years 7 months ago #128574 by Lefteris
Replied by Lefteris on topic Re: Attachments not working...cant download..
@Pedro Henrique

Hi. Can you test with the development version from getk2.org/assets/get ? There have been some changes to the router which should solve the issue. Let me know when you have any news on this.

Please Log in or Create an account to join the conversation.