Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

[Solved] Error in download attachment
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: [Solved] Error in download attachment

[Solved] Error in download attachment 10 years, 3 months ago #20658

Hi all,

I used SJ Flat News template, and i use the K2 component, when i attach a file (zip,pdf,... etc) in K2 item, i can't download it, i get this page (in the attached photo)..
I use:

Joomla 3.3.3
K2 Version 2.7.0.

I tried to install the other version from k2 but the same error, i disable advanced SEF for K2 URLs and nothing changed, i disabled the SEO Settings in joomla and nothing changed!!

Please help!!!
Attachments:
The topic has been locked.

Re: Error in download attachment 10 years, 2 months ago #20808

  • SA Thuy
Hi,

Go to file /temp/templates/sj_flatnews/html/com_k2/general/item.php change this code:
<a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo $attachment->link; ?>"><?php echo $attachment->title; ?></a>


to:

<a title="<?php echo htmlentities($attachment->titleAttribute, ENT_QUOTES, 'UTF-8'); ?>" href="<?php echo JRoute::_('media/k2/attachments/'.$attachment->filename); ?>" TARGET="_blank"> <?php echo $attachment->title ; ?>


Thanks
The topic has been locked.
  • Page:
  • 1
Time to create page: 0.20 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes