Follow us on Twitter
Collapse
Welcome, Guest
Please Login or Register.    Lost Password?
JoomAce Support
AceSEF
Hacks, Tricks and Tips

K2 articles sent to wrong path... issue coming from jcomments...
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: K2 articles sent to wrong path... issue coming from jcomments...
#6798
K2 articles sent to wrong path... issue coming from jcomments... 4 Months, 2 Weeks ago  
I was getting too many duplicate URLs being generated and causing issues. For some reason, the K2 plugin for jcomments was building links to the wrong menu item for my K2 articles... So, I reached out for help from AceSEF and their tool was great to identify the source coming from:
/components/com_jcomments/plugins/com_k2.plugin.php

So, I edited that file and changed the function to read:

Code: - Forums Func View Catid 54 Id 6798

Support Forums includes Forums Section View Category 54 Id 6798


function getObjectLink($id)
        {
                require_once (JPath::clean( JPATH_SITE.'/components/com_k2/helpers/route.php'));

                $db = & JCommentsFactory::getDBO();
                $db->setQuery( 'SELECT alias FROM jos_k2_items WHERE id = ' . $id );
                $alias = $db->loadResult();
                $link = JRoute::_(K2HelperRoute::getItemRoute($id.':'.$alias));



Hope that helps someone
Randy Arrowood
No photo available
VIP Customer
Posts: 2
graphgraph
Click here to see the profile of this user
The administrator has disabled public write access.
 
#12606
K2 articles sent to wrong path... issue coming from jcomments... 4 Months, 2 Weeks ago  
I was getting too many duplicate URLs being generated and causing issues. For some reason, the K2 plugin for jcomments was building links to the wrong menu item for my K2 articles... So, I reached out for help from AceSEF and their tool was great to identify the source coming from:
/components/com_jcomments/plugins/com_k2.plugin.php

So, I edited that file and changed the function to read:

Code:

function getObjectLink($id)
        {
                require_once (JPath::clean( JPATH_SITE.'/components/com_k2/helpers/route.php'));

                $db = & JCommentsFactory::getDBO();
                $db->setQuery( 'SELECT alias FROM jos_k2_items WHERE id = ' . $id );
                $alias = $db->loadResult();
                $link = JRoute::_(K2HelperRoute::getItemRoute($id.':'.$alias));



Hope that helps someone
Randy Arrowood
No photo available
VIP Customer
Posts: 2
graphgraph
Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
JoomAce Support
AceSEF
Hacks, Tricks and Tips
Powered by Kunenaget the latest posts directly to your desktop