Index: branches/5.0.x/core/kernel/db/db_event_handler.php =================================================================== diff -u -r12792 -r12877 --- branches/5.0.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 12792) +++ branches/5.0.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 12877) @@ -1,6 +1,6 @@ Application->isDebugMode()) { $this->Application->Debugger->appendTrace(); } + trigger_error('ItemLoad Permission Failed for prefix ['.$event->getPrefixSpecial().'] in '.($status_checked ? 'checkItemStatus' : 'CheckPermission').'', E_USER_WARNING); - $next_template = $this->Application->isAdmin ? 'no_permission' : $this->Application->ConfigValue('NoPermissionTemplate'); - $this->Application->Redirect($next_template, Array('next_template' => $this->Application->GetVar('t'))); + $redirect_template = $this->Application->isAdmin ? 'no_permission' : $this->Application->ConfigValue('NoPermissionTemplate'); + + $redirect_params = $this->Application->HttpQuery->getRedirectParams(true); + $next_template = $this->Application->HREF('', '', $redirect_params); + + $redirect_params = Array ( + 'm_cat_id' => 0, + 'next_template' => urlencode('external:' . $next_template), + ); + + $this->Application->Redirect($redirect_template, $redirect_params); } }