Welcome, Guest

K2 attachments in 'Platform' template
(1 viewing) (1) Guest
  • Page:
  • 1


Posting guidelines
To help us help you faster please ensure that you include the following details in your forum post:
- A link to your site (you can create a support ticket if you need to provide us with confidential information.
- Please ensure that css and javascript compression is disabled in your template settings.
- Please ensure that you have checked the change log and your template and extension are up to date.
- Please search the forum to see if your answer has already been asked before.
- Please ensure that you only post your request in either the forum or ticket system but not both.
- Please only post in an existing thread if your issue is exactly the same as the one being discussed in the thread.

TOPIC: K2 attachments in 'Platform' template

K2 attachments in 'Platform' template 1 year, 3 months ago #61286

Hello,

When using the 'Platform' template, there is a problem with K2 file attachments. The URL to the files is 'broken' in platform which lead to 404 errors.

Platform's URL: /component/k2/item/download/5_0de88371b4afe833bda932380ce0066c.html

K2's default URL:
/component/k2/item/download/5.html

I've taken a look at K2's item .PHP file and noticed that their code to shape the URL was different than yours, with.

**Default item.php code**

<a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo $attachment->link; ?>"><?php echo $attachment->title; ?></a>

**Platform item.php**

<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); ?>">
<?php echo $attachment->title ; ?>
</a>

Replacing the Platform code with the default code solved the problem. Your code
  • Toretto
  • OFFLINE
  • 12 Month basic
  • Posts: 11
  • Karma: 0

Re: K2 attachments in 'Platform' template 1 year, 3 months ago #61288

Thanks man.

That was the fix I just added to the package as well - it's in v2.0.3.

Not sure if you saw the original blog post about the working Bee -
www.joomlabamboo.com/blog/about-the-club/the-bamboo-working-bee

But bugs with a fix supplied = an extra month on your subscription.

So thanks man!

Cheers Anthony
Creative Unique Minimal Joomla Templates
  • Page:
  • 1
Time to create page: 0.33 seconds