Fixed: The noticies on the Admin controllers when the identifier provided manually by editing the url does not exists in the database

This commit is contained in:
vishalsingh.qlo325
2024-05-07 13:07:36 +05:30
parent 8dcfc9e892
commit 646f45c783
8 changed files with 27 additions and 16 deletions

View File

@@ -85,6 +85,7 @@ class AdminCmsContentControllerCore extends AdminController
public function initContent()
{
$this->loadObject(true);
$this->initTabModuleList();
$this->renderPageHeaderToolbar();
@@ -151,8 +152,9 @@ class AdminCmsContentControllerCore extends AdminController
if (Tools::getValue('addcms') !== false) {
$this->toolbar_title[] = $this->l('Add new');
} elseif ($id_cms_page) {
$cms_page = new CMS($id_cms_page);
} elseif ($id_cms_page
&& Validate::isLoadedObject($cms_page = new CMS($id_cms_page))
) {
$this->toolbar_title[] = sprintf($this->l('Edit: %s'), $cms_page->meta_title[$this->context->employee->id_lang]);
}
} else {