I need help.
This error occurs when I create a page.
“Attempt to read property “pThemeID” on null”
I was able to create pages up until now, but I think this error started appearing after I changed the theme of one of my pages to “Atomik”.
I’m using a theme purchased from the marketplace.
Concrete Version Core Version - 9.3.8
PHP Version 8.2.22
error log is
/public_html/updates/concrete-cms-9.3.8-remote-updater/concrete/src/Page/Page.php
*/
public function getCollectionThemeObject()
{
if (!isset($this->themeObject)) {
$app = Facade::getFacadeApplication();
$tmpTheme = $app->make(ThemeRouteCollection::class)
->getThemeByRoute($this->getCollectionPath());
if (isset($tmpTheme[0])) {
switch ($tmpTheme[0]) {
case VIEW_CORE_THEME:
$this->themeObject = new \Concrete\Theme\Concrete\PageTheme();
break;
case 'dashboard':
$this->themeObject = new \Concrete\Theme\Dashboard\PageTheme();
break;
default:
$this->themeObject = PageTheme::getByHandle($tmpTheme[0]);
break;
}
} elseif ($this->vObj->pThemeID < 1) {
$this->themeObject = PageTheme::getSiteTheme();
} else {
$this->themeObject = PageTheme::getByID($this->vObj->pThemeID);
}
}
if (!$this->themeObject) {
$this->themeObject = PageTheme::getSiteTheme();
}
return $this->themeObject;
}
/**
* Get the page name.
*
* @return string
*/
public function getCollectionName()
{
$customAliasName = (string) $this->getCustomAliasName();
Arguments
“Attempt to read property “pThemeID” on null”