Kunena 6.3.5 released

The Kunena team has announce the arrival of Kunena 6.3.5 [K 6.3.5] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 and issues discovered during the last development stages of K 6.3
Note: Please go to the Kunena Dashboard after an upgrade so that the Kunena database tables are also updated.

Solved How to change canonical link on forum main page?

More
9 years 1 month ago #1 by romagromov
Hi!

I checked my site for broken links and found duplicate links


/forum/category/list

and

/forum/

it is same pages.

This link displays in code:

<link href="/forum/category/list" rel="canonical" />

but forum main page link looks as /forum/

How I can change it?

Download Free Software for Windows absolutly free.

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #2 by romagromov
Any ideas?

Download Free Software for Windows absolutly free.

Please Log in or Create an account to join the conversation.

More
More
9 years 1 month ago #4 by romagromov
I can't understand...

I need to fix BUG. Not to remove canonical.


I need on forum main page canonical displays as

<link href="/forum/" rel="canonical" />

instead

<link href="/forum/category/list" rel="canonical" />

Download Free Software for Windows absolutly free.

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago - 9 years 1 month ago #5 by 810
mhh I found a way, but its showed:

<link href="/master/forum" rel="canonical" />
<link href="/master/forum/recent" rel="canonical" />

Is that ok?
components\com_kunena\controllers\home.php line 28
Code:
$doc = JFactory::getDocument(); $doc->addHeadLink( 'forum', 'canonical', 'rel', '' );
Last edit: 9 years 1 month ago by 810.

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #6 by romagromov
But 2 canonical links is impossible...

Download Free Software for Windows absolutly free.

Please Log in or Create an account to join the conversation.

More
9 years 3 weeks ago #7 by romagromov
Still have problem...

2 canonical links on page is inadmissible

<link href="/master/forum" rel="canonical" />
<link href="/master/forum/recent" rel="canonical" />


Download Free Software for Windows absolutly free.

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago - 8 years 10 months ago #8 by romagromov
Ok, I made little hack for file

/libraries/kunena/view.php

1. Find code (line 105)
Code:
if (JFactory::getApplication()->isAdmin())

add above this code
Code:
$juricurrent = JURI::current();

Then, after code
Code:
{ $this->displayLayout(); }

add

Code:
elseif ($juricurrent == 'http://yoursite/forum'){ $this->document->addHeadLink( $juricurrent, 'canonical', 'rel', '' ); include JPATH_SITE .'/'. $this->ktemplate->getFile('html/display.php'); }

where http://yoursite/forum is your url on forum main page

So, public function displayAll code should looks like:

Code:
public function displayAll() { if ($this->inLayout) { throw new LogicException(sprintf('HMVC template should not call %s::%s()', __CLASS__, __FUNCTION__)); } if ($this->me->isAdmin()) { if ($this->config->board_offline) { $this->app->enqueueMessage ( JText::_('COM_KUNENA_FORUM_IS_OFFLINE'), 'notice'); } if ($this->config->debug) { $this->app->enqueueMessage ( JText::_('COM_KUNENA_WARNING_DEBUG'), 'notice'); } } if ($this->me->isBanned()) { $banned = KunenaUserBan::getInstanceByUserid($this->me->userid, true); if (!$banned->isLifetime()) { $this->app->enqueueMessage ( JText::sprintf ( 'COM_KUNENA_POST_ERROR_USER_BANNED_NOACCESS_EXPIRY', KunenaDate::getInstance($banned->expiration)->toKunena('date_today')), 'notice'); } else { $this->app->enqueueMessage ( JText::_ ( 'COM_KUNENA_POST_ERROR_USER_BANNED_NOACCESS' ), 'notice'); } } $this->state = $this->get ( 'State' ); $this->ktemplate->initialize(); $juricurrent = JURI::current(); if (JFactory::getApplication()->isAdmin()) { $this->displayLayout(); } elseif ($juricurrent == 'http://yoursite/forum'){ $this->document->addHeadLink( $juricurrent, 'canonical', 'rel', '' ); include JPATH_SITE .'/'. $this->ktemplate->getFile('html/display.php'); } else { $this->document->addHeadLink( KunenaRoute::_(), 'canonical', 'rel', '' ); include JPATH_SITE .'/'. $this->ktemplate->getFile('html/display.php'); if ($this->config->get('credits', 1)) { $this->poweredBy(); } } }

Of course, this hack will lost after update.

I can't understand, why Kunena developers can't fix this major BUG.

Download Free Software for Windows absolutly free.
Last edit: 8 years 10 months ago by romagromov.

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago #9 by 810
The following user(s) said Thank You: romagromov

Please Log in or Create an account to join the conversation.

Time to create page: 0.427 seconds