I do have my call stack. The first line goes directly to the layout file not found exception
I have checked for misspelled errors more times than I can count. Wouldn't this also reflect in J3 if it was spelling error?
I wonder if it isn't something in J4 with the checkEditID function related to Session but all else is good.
My Controller:
// No Direct Access
defined ('_JEXEC') or die('Resticted Aceess');
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\MVC\Controller\BaseController;
class DlejtalentController extends BaseController {
public function display( $cachable=false, $urlparams=false){
$view = $this->input->get('view','talents');
$layout = $this->input->get('layout','default');
$id = $this->input->getInt('id');
$this->input->set('view',$view);
$user = Factory::getUser();
$isadmin = $user->authorise('core.admin');
$restrictedViews = array(
'group' => ComponentHelper::getParams('com_dlejtalent')->get('agent_group_name', 'Agent'),
'views' => array('agent', 'agents', 'category', 'categories')
);
$access = DlejtalentHelper::isDesiredGroup($restrictedViews['group']) || DlejtalentHelper::isDesiredGroup('Super Users') || $isadmin;
$isAgent = DlejtalentHelper::isDesiredGroup($restrictedViews['group']);
if (!$access) {
$this->setMessage(Text::_('JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN'),'error');
$this->setRedirect(Route::_('index.php',false));
return false;
} else {
if ($isAgent) {
if (in_array($view, $restrictedViews['views'])) {
$this->setMessage(Text::_('JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN'),'error');
$this->setRedirect(Route::_('index.php?option=com_dlejtalent&view=talents',false));
return false;
}
}
}
if(($view == 'talent' || $view == 'agent' || $view == 'category' || $view == 'talentfeature' || $view == 'bookingrequest')
&& $layout == 'edit'
&& (!$this->checkEditId('com_dlejtalent.edit.talent',$id) && !$this->checkEditId('com_dlejtalent.edit.agent',$id) && !$this->checkEditId('com_dlejtalent.edit.talentfeature',$id) && !$this->checkEditId('com_dlejtalent.edit.category',$id) && !$this->checkEditId('com_dlejtalent.edit.bookingrequest',$id))){
$this->setMessage(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id),'error');
$this->setRedirect(Route::_('index.php?option=com_dlejtalent&view=talents',false));
return false;
}
parent::display($cachable,$urlparams);
return $this;
}
}