This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Seth
Seth

Hmm, when I navigate to backend/cms I get an error. This is after I created a plugin, and then deleted the model and controller associated with the plugin, leaving only the component. That may be unrelated though - I removed the Controller / Model reference from the Plugin.php file. Either way, now I have this nasty exception which I have no clue how to solve. Any ideas where to start?

Trying to get property of non-object /var/www/reformer/friend.reformer.me/modules/cms/widgets/TemplateList.php line 236

Looking in TemplateList.php -

This line is causing the issue:

        $description = $item->$descriptionProperty;

Snippet:

protected function normalizeItem($item)
{
    $description = null;
    echo $item;
    if ($descriptionProperty = $this->descriptionProperty) {
        $description = $item->$descriptionProperty;
    }

    $descriptions = [];
    foreach ($this->descriptionProperties as $property => $title) {
        if ($item->$property) {
            $descriptions[$title] = $item->$property;

Update: The issue turned out to be something with the Theme - Creating a blank theme and switching to it solve the issue.

Looking deeper into it it looks like the ownership permissions were incorrect for theme.yaml in my custom theme.

However when I fix the permissions I get a different error

We're sorry, but an unhandled error occurred. Please see the details below.

Object of class Cms\Classes\Page could not be converted to string
/var/www/reformer/friend.reformer.me/modules/cms/widgets/TemplateList.php line 234

Error on this line:

echo $item;

Snippet:

    return $result;
}

protected function normalizeItem($item)
{
    $description = null;
    echo $item;
    if ($descriptionProperty = $this->descriptionProperty) {
        $description = $item->$descriptionProperty;
    }

    $descriptions = [];
    foreach ($this->descriptionProperties as $property => $title) {

Update - I'm going to reinstall. I didn't use the installer for this project, and I think that messed up some permissions that would of otherwise been set.

Last updated

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.