Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparse throwing issue in C3 #38

Open
zizther opened this issue Jul 20, 2018 · 5 comments
Open

Preparse throwing issue in C3 #38

zizther opened this issue Jul 20, 2018 · 5 comments

Comments

@zizther
Copy link

zizther commented Jul 20, 2018

Since updating a site from Craft 2 to Craft 3, I am getting this error

Call to a member function setAttributes() on null

1. craft/vendor/craftcms/cms/src/base/Plugin.php at line 199

    /**
     * @inheritdoc
     */
    public function setSettings(array $settings)
    {
        $this->getSettings()->setAttributes($settings, false);
    }
                
2. in craft/vendor/yiisoft/yii2/base/Component.php at line 180 – craft\base\Plugin::setSettings(['disableElementTables' => '1'])

3. in craft/vendor/yiisoft/yii2/BaseYii.php at line 546 – yii\base\Component::__set('settings', ['disableElementTables' => '1'])

4. in craft/vendor/yiisoft/yii2/base/BaseObject.php at line 107 – yii\BaseYii::configure(aelvan\preparsefield\PreparseField, ['name' => 'Preparse Field', 'version' => '1.0.0', 'schemaVersion' => '1.0.0', 'description' => 'A fieldtype that parses Twig whe...', ...])
@zizther zizther changed the title Throwing error with 3.061.1 Throwing error with 3.0.16.1 Jul 24, 2018
@zizther zizther changed the title Throwing error with 3.0.16.1 Preparse throwing issue in C3 Jul 24, 2018
@zizther
Copy link
Author

zizther commented Jul 24, 2018

This issue ended up being a setting being stored from the C2 plugin and being carried over to the C3 install.
In the plugins table the prepare-field row had {"disableElementTables": "1"}. I removed this, and it works fine now.

I am closing this issue.

@zizther zizther closed this as completed Jul 24, 2018
@krizzzly
Copy link

krizzzly commented May 15, 2019

hello, i have the same issue, could you please explain more detailed how to resolve the issue, thank you. In which database-table the settings of the plugins are now stored, so i could remove this one particular setting.

@zizther
Copy link
Author

zizther commented May 16, 2019

@krizzzly After you have done the update from C2 to C3, if you have a look at your database, go to the plugins table and find the PreparseField row and see if it contains {"disableElementTables": "1"}.

I removed this, and it fixed my issue.

@krizzzly
Copy link

unfortunately the "settings" column in "plugins" table is not there anymore. I think all the settings went into 'info' table and get compiled into a string there.

@zizther
Copy link
Author

zizther commented May 16, 2019

Interesting, maybe it has changed since I did it with an earlier version of C3.
I will reopen this.

@zizther zizther reopened this May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants