Tuesday, 25 August 2009 23:36

Problem with Email and Social Links in K2 v2.0.0 STABLE

by Ari Magder
(0 votes)

I recently ran into trouble with K2 v2 stable when I noticed that the "email this article" functionality was including local URLs in the email link instead of gobal. A quick patch to the item.php model corrected this.

On line 67 of 'components/com_k2/models/item.php' the replace the line under the comment "//Email link" with the following

Code:
$item->link = rtrim(JURI::base(),'/').$item->link;
$item->emailLink = JRoute::_('index.php?option=com_mailto&tmpl=component&link='.base64_encode($item->link));

This corrects not only the email link but also the twitter and social links that use the same variable ($item->link or $this->item ->link).

For those of you who don't feel like editing code yourself, I've included the patched file as an attachment below. Just download and extract into your base Joomla directory.

Download attachments:
Last modified on Tuesday, 25 August 2009 23:53

Ari Magder

E-mail: This e-mail address is being protected from spambots. You need JavaScript enabled to view it
Read 1011 times Like this? Tweet it to your followers!