Error Call to a member function getPageTemplateID() on null

Permalink Browser Info Environment
When I try to install a theme with content I receive error message:
Clean c5 without content, and also with content - problem is the same.

Call to a member function getPageTemplateID() on null

/home2/btcmarke/public_html/cu/concrete/src/Page/Type/Type.php
774. $ptAllowedPageTemplates,
$ptIsInternal,
$ptLaunchInComposer,
$ptDisplayOrder,
$ptIsFrequentlyAdded,
$siteTypeID,
$pkgID,
)
);
$ptID = $db->Insert_ID();
if ($ptAllowedPageTemplates != 'A') {
foreach ($templates as $pt) {
if (!is_object($pt)){
$pt = PageTemplate::getByHandle($pt);
}
$db->Execute(
'insert into PageTypePageTemplates (ptID, pTemplateID) values (?, ?)',
array(
$ptID,
$pt->getPageTemplateID(),
)
);
}
}

Type: Ticket
Status: Archived
pawelkozel
View Replies:
shahroq replied on at Permalink Reply
shahroq
The theme should be installed with core sample contents. So plz first install a fresh instance of c5 in full content, then install the theme.
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.

concrete5 Environment Information

BlueHost, C5 8.5.2

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.