Support Forum

  • Page:
  • 1

K2 attachments in 'Platform' template

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

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's Avatar
  • Toretto
  • 12 Month basic
  • 13 posts
  • Karma: 0
The administrator has disabled public write access.
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
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers