• Home
  • Get help
  • Ask a question
Last post 4 hours 24 min ago
Posts last week 191
Average response time last week 1 hour 50 min
All time posts 68187
All time tickets 10530
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#969 – Problem with authorlist

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Tuesday, 08 September 2015 07:31 UTC
soloaffitti
 hi, i have a problem with author list component.
When i turn sh404sef on i receive this error in all pages where i have that component:
Fatal error: Cannot redeclare class AuthorlistRouter in /var/www/site/soloaff/test.blogaffitto.it/components/com_authorlist/router.php on line 15
Can you tell me how to fix it?
Here the code in that file:

defined('_JEXEC') or die;

class AuthorlistRouter extends JComponentRouterBase
{
public function build(&$query)
{
$segments = array();
$app = JFactory::getApplication();
$menu = $app->getMenu();

if (empty($query['Itemid'])) {
$menuItem = $menu->getActive();
} else {
$menuItem = $menu->getItem($query['Itemid']);
}
$mView = (empty($menuItem->query['view'])) ? null : $menuItem->query['view'];
$mId = (empty($menuItem->query['id'])) ? null : $menuItem->query['id'];

if (isset($query['layout']) && $query['layout'] != 'edit') {
unset($query['layout']);
}

if (isset($query['view']))
{
$view = $query['view'];
if (empty($query['Itemid'])) {
$segments[] = $view;
unset($query['view']);
}
} else {
return $segments;
}

if ($view == 'author') {
if ($mId != intval($query['id']) || $mView != $view) {
if (isset($query['id'])) {
$id = $query['id'];
}
$segments[] = $id;
}
} else {
return $segments;
}

if (isset($query['view']) && ($mView == $query['view']) and (isset($query['id'])) and ($mId == intval($query['id']))) {
unset($query['view']);
unset($query['id']);

return $segments;
}

unset($query['view']);
unset($query['id']);

return $segments;
}

public function parse(&$segments)
{
$app = JFactory::getApplication();
$menu = $app->getMenu();
$item = $menu->getActive();

$count = count($segments);

if (!isset($item)) {
$vars['view'] = $segments[0];
$vars['id'] = $segments[$count - 1];

return $vars;
}

$vars['view'] = 'author';
$vars['id'] = $segments[$count - 1];

return $vars;
}
}
Tuesday, 08 September 2015 08:56 UTC
wb_weeblr
Hi

WHat exact version of sh404SEF are you using?

Rgds
 
Tuesday, 08 September 2015 09:01 UTC
wb_weeblr
HI again

I have found a situation where this could be a problem with us. Can you try this development version?
Please download from this page.

Rgds
 
Tuesday, 08 September 2015 09:19 UTC
soloaffitti
hi, thanks for your answer.
I solved using the feature in your component to disable sh404sef rewriting in a specific component
Tuesday, 08 September 2015 09:42 UTC
wb_weeblr
Hi

Can you at least test that this version allows proper functionning with the defautl setting?

Rgds
 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.