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

Call to undefined method craft\services\Users::hasUris() #318

Closed
SanboKyo opened this issue Mar 28, 2024 · 3 comments
Closed

Call to undefined method craft\services\Users::hasUris() #318

SanboKyo opened this issue Mar 28, 2024 · 3 comments

Comments

@SanboKyo
Copy link

Description

When I try to edit one of my four transactional emails, I get an

Call to undefined method craft\services\Users::hasUris()

in vendor/craftcms/cms/src/elements/conditions/ElementCondition.php [133]

(Controller / Action: elements/edit)

How to reproduce

Edit a Transactional Email in Control Panel

Sprout Version

4.44.444-beta.7

Craft Version

4.8.6

Database Type Version

MySQL 8.0.36

@BenParizek
Copy link
Member

Can you provide the stack trace of the error your seeing?

So far I'm unable to recreate this but do recognize the class names you shared, I just need a bit more info to figure out how they are getting triggered.

@SanboKyo
Copy link
Author

#0 /.../vendor/craftcms/cms/src/elements/conditions/users/UserCondition.php(21): craft\elements\conditions\ElementCondition->conditionRuleTypes()
#1 /.../vendor/craftcms/cms/src/base/conditions/BaseCondition.php(112): craft\elements\conditions\users\UserCondition->conditionRuleTypes()
#2 /.../vendor/craftcms/cms/src/base/conditions/BaseCondition.php(146): craft\base\conditions\BaseCondition->getConditionRuleTypes()
#3 /.../vendor/craftcms/cms/src/base/conditions/BaseCondition.php(270): craft\base\conditions\BaseCondition->getSelectableConditionRules()
#4 /.../vendor/craftcms/cms/src/web/View.php(1669): craft\base\conditions\BaseCondition->craft\base\conditions\{closure}()
#5 /.../vendor/craftcms/cms/src/base/conditions/BaseCondition.php(268): craft\web\View->namespaceInputs(Object(Closure), 'conditionRules')
#6 /.../vendor/craftcms/cms/src/base/conditions/BaseCondition.php(253): craft\base\conditions\BaseCondition->getBuilderInnerHtml()
#7 /.../vendor/barrelstrength/sprout/src/transactional/notificationevents/ElementEventTrait.php(32): craft\base\conditions\BaseCondition->getBuilderHtml()
#8 /.../vendor/twig/twig/src/Extension/CoreExtension.php(1635): BarrelStrength\Sprout\transactional\notificationevents\BaseElementNotificationEvent->getSettingsHtml()
#9 /.../vendor/craftcms/cms/src/helpers/Template.php(129): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(BarrelStrength\Sprout\transactional\components\notificationevents\UserActivatedNotificationEvent), 'getSettingsHtml', Array, 'method', false, false)
#10 /.../storage/runtime/compiled_templates/41/414b77911a016a90b92d5b74431e460f.php(80): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(BarrelStrength\Sprout\transactional\components\notificationevents\UserActivatedNotificationEvent), 'getSettingsHtml', Array, 'method')
#11 /.../vendor/twig/twig/src/Template.php(394): __TwigTemplate_c2120f4ef90c99a8c78edc7f9a59288b->doDisplay(Array, Array)
#12 /.../vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#13 /.../vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#14 /.../vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
#15 /.../vendor/twig/twig/src/Environment.php(280): Twig\TemplateWrapper->render(Array)
#16 /.../vendor/craftcms/cms/src/web/View.php(482): Twig\Environment->render('sprout-module-t...', Array)
#17 /.../vendor/barrelstrength/sprout/src/transactional/components/elements/fieldlayoutelements/NotificationEventField.php(50): craft\web\View->renderTemplate('sprout-module-t...', Array)
#18 /.../vendor/craftcms/cms/src/fieldlayoutelements/BaseField.php(235): BarrelStrength\Sprout\transactional\components\elements\fieldlayoutelements\NotificationEventField->inputHtml(Object(BarrelStrength\Sprout\mailer\components\elements\email\EmailElement), false)
#19 /.../vendor/craftcms/cms/src/models/FieldLayout.php(738): craft\fieldlayoutelements\BaseField->formHtml(Object(BarrelStrength\Sprout\mailer\components\elements\email\EmailElement), false)
#20 /.../vendor/craftcms/cms/src/web/View.php(1663): craft\models\FieldLayout->craft\models\{closure}()
#21 /.../vendor/craftcms/cms/src/models/FieldLayout.php(737): craft\web\View->namespaceInputs(Object(Closure), NULL)
#22 /.../vendor/craftcms/cms/src/controllers/ElementsController.php(863): craft\models\FieldLayout->createForm(Object(BarrelStrength\Sprout\mailer\components\elements\email\EmailElement), false, Array)
#23 /.../vendor/craftcms/cms/src/controllers/ElementsController.php(415): craft\controllers\ElementsController->_prepareEditor(Object(BarrelStrength\Sprout\mailer\components\elements\email\EmailElement), false, true, Object(craft\web\Response), 'main-form', Object(Closure), Object(Closure), Object(Closure))
#24 [internal function]: craft\controllers\ElementsController->craft\controllers\{closure}(Object(craft\web\Response), 'main-form')
#25 /.../vendor/craftcms/cms/src/web/CpScreenResponseFormatter.php(121): call_user_func(Object(Closure), Object(craft\web\Response), 'main-form')
#26 /.../vendor/craftcms/cms/src/web/CpScreenResponseFormatter.php(49): craft\web\CpScreenResponseFormatter->_formatTemplate(Object(craft\web\Response), Object(craft\web\CpScreenResponseBehavior))
#27 /.../vendor/yiisoft/yii2/web/Response.php(1100): craft\web\CpScreenResponseFormatter->format(Object(craft\web\Response))
#28 /.../vendor/craftcms/cms/src/web/Response.php(337): yii\web\Response->prepare()
#29 /.../vendor/yiisoft/yii2/web/Response.php(340): craft\web\Response->prepare()
#30 /.../vendor/yiisoft/yii2/base/Application.php(390): yii\web\Response->send()
#31 /.../web/index.php(12): yii\base\Application->run()
#32 /Applications/Herd.app/Contents/Resources/valet/server.php(151): require('/Users/admin/Va...')
#33 {main} {"memory":32304528,"exception":"[object] (Error(code: 0): Call to undefined method craft\\services\\Users::hasUris() at /.../vendor/craftcms/cms/src/elements/conditions/ElementCondition.php:133)"} 

@BenParizek
Copy link
Member

@SanboKyo I've just released Sprout Email 4.44.444-beta.8 which addresses this issue. Thanks for reporting.

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

No branches or pull requests

2 participants