Index: branches/RC/core/kernel/db/db_event_handler.php =================================================================== diff -u -r9043 -r9121 --- branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 9043) +++ branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 9121) @@ -411,10 +411,12 @@ $perm_status = true; $user_id = $this->Application->RecallVar('user_id'); $event->setEventParam('top_prefix', $this->Application->GetTopmostPrefix($event->Prefix, true)); + $status_checked = false; if ($user_id == -1 || $this->CheckPermission($event)) { // don't autoload item, when user doesn't have view permission $this->LoadItem($event); + $status_checked = true; if ($user_id != -1 && !$this->checkItemStatus($event)) { $perm_status = false; } @@ -428,7 +430,7 @@ if ($this->Application->isDebugMode()) { $this->Application->Debugger->appendTrace(); } - trigger_error('ItemLoad Permission Failed for prefix ['.$event->getPrefixSpecial().']', E_USER_WARNING); + 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'))); }