×
K5.1.1 is released (10 Jun 2018)

The Kunena team is pleased to announce Kunena 5.1.1 [K 5.1.1].
Please read the blog post for information:

× Please note: The Kunena project team takes NO responsibility for maintaining nor supporting anything in this category.

Question Category view and sef causes 500 error when the url is a non kunena url

More
4 years 1 month ago #1 by alanski
No forum config needed here :)

The issue: we have some old urls after a site move whci h are beyond our control - google just indexes them.
eg "forum/our-services/itemlist/category/100-newsroom"

This is some old mangled url that is from k2 link.

Kunena sees the sef url and assumes its a forum url and tries to fire $category->getLastTopic(); in views/category/view.html.php line 227

This creates a 500 error as the category is null.

This could hurt your SEO if you have urls coming in like this. We found them in Google Webmaster tools.

Our fix was to edit the function displaycategory

function displayCategory($category) {

//add
if(is_null($category))
$app = JFactory::getApplication();
$url = JRoute::_('index.php?option=com_kunena');
$app->redirect($url, true);
return;
//end add

Not sure if this should really be checked in the router? [// Support URIs like: /forum/12-my_category] line 82

Hopefully this helps someone else

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

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