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

Error after update to 2.0.0-beta.6: InvalidConfigException Unable to locate message source for category 'typedlinkfield'. #79

Closed
Jones-S opened this issue Oct 18, 2019 · 4 comments
Labels

Comments

@Jones-S
Copy link

Jones-S commented Oct 18, 2019

I updated to 2.0.0-beta.6 to get graphql support, then I was prompted to make a database change and after that I always get this error:

Invalid Configuration – yii\base\InvalidConfigException
Unable to locate message source for category 'typedlinkfield'.

When loading any CP page.
It could be that this is linked to translations in a multisite setup:

Full stack trace:

yii\base\InvalidConfigException: Unable to locate message source for category 'typedlinkfield'. in /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/i18n/I18N.php:201
Stack trace:
#0 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/i18n/I18N.php(89): yii\i18n\I18N->getMessageSource('typedlinkfield')
#1 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/i18n/I18N.php(327): yii\i18n\I18N->translate('typedlinkfield', 'Input fields', Array, 'en-US')
#2 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/BaseYii.php(526): craft\i18n\I18N->translate('typedlinkfield', 'Input fields', Array, 'en-US')
#3 /Users/USER/Documents/github/my-repo/vendor/sebastianlenz/linkfield/src/models/LinkType.php(101): yii\BaseYii::t('typedlinkfield', 'Input fields')
#4 /Users/USER/Documents/github/my-repo/vendor/sebastianlenz/linkfield/src/fields/LinkField.php(97): lenz\linkfield\models\LinkType->getTranslatedDisplayGroup()
#5 [internal function]: lenz\linkfield\fields\LinkField->lenz\linkfield\fields\{closure}(Object(lenz\linkfield\models\input\InputLinkType), Object(lenz\linkfield\models\input\InputLinkType))
#6 /Users/USER/Documents/github/my-repo/vendor/sebastianlenz/linkfield/src/fields/LinkField.php(100): uasort(Array, Object(Closure))
#7 /Users/USER/Documents/github/my-repo/vendor/sebastianlenz/linkfield/src/fields/LinkField.php(226): lenz\linkfield\fields\LinkField->getAvailableLinkTypes()
#8 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/base/Component.php(180): lenz\linkfield\fields\LinkField->setTypeSettings(Array)
#9 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\Component->__set('typeSettings', Array)
#10 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(lenz\linkfield\fields\LinkField), Array)
#11 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/helpers/Component.php(113): yii\base\BaseObject->__construct(Array)
#12 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/services/Fields.php(562): craft\helpers\Component::createComponent(Array, 'craft\\base\\Fiel...')
#13 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/services/Fields.php(587): craft\services\Fields->createField(Array)
#14 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1941): craft\services\Fields->getAllFields()
#15 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1364): craft\elements\db\ElementQuery->customFields()
#16 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/db/QueryBuilder.php(227): craft\elements\db\ElementQuery->prepare(Object(craft\db\mysql\QueryBuilder))
#17 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/db/Query.php(146): yii\db\QueryBuilder->build(Object(craft\elements\db\UserQuery))
#18 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/db/Query.php(274): yii\db\Query->createCommand(Object(craft\db\Connection))
#19 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/db/Query.php(177): yii\db\Query->one(NULL)
#20 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1509): craft\db\Query->one(NULL)
#21 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/elements/User.php(383): craft\elements\db\ElementQuery->one()
#22 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/web/User.php(690): craft\elements\User::findIdentity('1')
#23 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/web/User.php(506): yii\web\User->renewAuthStatus()
#24 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/web/User.php(192): craft\web\User->renewAuthStatus()
#25 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/web/User.php(246): yii\web\User->getIdentity()
#26 /Users/USER/Documents/github/my-repo/vendor/mmikkel/cp-field-inspect/src/CpFieldInspect.php(80): craft\web\User->getIsAdmin()
#27 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/base/BaseObject.php(109): mmikkel\cpfieldinspect\CpFieldInspect->init()
#28 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/base/Module.php(158): yii\base\BaseObject->__construct(Array)
#29 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/base/Plugin.php(130): yii\base\Module->__construct('cp-field-inspec...', Object(craft\web\Application), Array)
#30 [internal function]: craft\base\Plugin->__construct('cp-field-inspec...', Object(craft\web\Application), Array)
#31 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/di/Container.php(384): ReflectionClass->newInstanceArgs(Array)
#32 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('mmikkel\\cpfield...', Array, Array)
#33 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('mmikkel\\cpfield...', Array, Array)
#34 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/services/Plugins.php(897): yii\BaseYii::createObject(Array, Array)
#35 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/services/Plugins.php(230): craft\services\Plugins->createPlugin('cp-field-inspec...', Array)
#36 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/base/ApplicationTrait.php(1361): craft\services\Plugins->loadPlugins()
#37 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/web/Application.php(112): craft\web\Application->_postInit()
#38 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Application->init()
#39 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array)
#40 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/src/web/Application.php(100): yii\base\Application->__construct(Array)
#41 [internal function]: craft\web\Application->__construct(Array)
#42 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/di/Container.php(384): ReflectionClass->newInstanceArgs(Array)
#43 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('craft\\web\\Appli...', Array, Array)
#44 /Users/USER/Documents/github/my-repo/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('craft\\web\\Appli...', Array, Array)
#45 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/bootstrap/bootstrap.php(244): yii\BaseYii::createObject(Array)
#46 /Users/USER/Documents/github/my-repo/vendor/craftcms/cms/bootstrap/web.php(52): require('/Users/USER/Do...')
#47 /Users/USER/Documents/github/my-repo/web/index.php(21): require('/Users/USER/Do...')
#48 {main}

Craft Version: 3.4.x-dev (Multisite setup)
Plugin version: 2.0.0-beta.6
PHP: 7.2

@sebastian-lenz
Copy link
Owner

Hi @Jones-S, thank you for reporting this. Unfortunately from the call stack it looks like you are using a plugin called "cp-field-inspect" and that plugin is causing the error. The plugin accesses other fields / plugins within it's constructor / init method (see craftcms/cms#4944).

@Jones-S
Copy link
Author

Jones-S commented Oct 21, 2019

Alright, thanks for having had a look at this.
I will open an issue @cp-field-inspect 👍

@mmikkel
Copy link

mmikkel commented Oct 21, 2019

FWIW; I just published CP Field Inspect 1.0.7, which should resolve this issue.

@dlindberg
Copy link

For anyone else that runs into the issue, marionnewlevant/craft-snitch and verbb/knock-knock also tiger this condition (possibly more given the nature of the issue that @mmikkel explained ). I'm opening issues on the respective repositories for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants