×
Kunena 5.2 Beta 1 Released (24 Sep 2020)

The Kunena team is thrilled to announce the first public beta release of Kunena 5.2, a native Joomla extension for Joomla 3.9. This is a development release and should be only be used for testing; this version is not recommended for live websites at this stage.

The purpose of this release is to encourage testing by downloading, installing and identifying any problems or shortcomings that people may discover. K 5.2.0 B1 is stable and we are aware that people will discover defects. We encourage you to use the forum to report defects, as soon as they are discovered, so that the development team can work through the problems before the release of K 5.1 as a stable product. Reporting defects does not mean that the problems can or will be fixed. The Kunena team is looking forward to hearing your feedback on how well we have achieved our design goals.

Solved How to change canonical link on forum main page?

More
5 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
5 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
5 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
5 years 1 month ago - 5 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
$doc = JFactory::getDocument();
$doc->addHeadLink( 'forum', 'canonical', 'rel', '' );
Last edit: 5 years 1 month ago by 810.

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

More
5 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
5 years 1 week 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
4 years 10 months ago - 4 years 10 months ago #8 by romagromov
Ok, I made little hack for file

/libraries/kunena/view.php

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

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

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

add

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

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

So, public function displayAll code should looks like:

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 == 'https://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: 4 years 10 months ago by romagromov.

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

More
4 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.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.141 seconds