verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
96 stars 72 forks source link

Internal server error when creating stencil #2068

Closed rinusvandam closed 1 month ago

rinusvandam commented 1 month ago

Describe the bug

We've just updated our Craft Pro site including the Formie plugin, and now we can't create any stencils.

Steps to reproduce

  1. Visit Formie > Settings > Stencils
  2. Click the “New Stencil” button
  3. Fill in a stencil name an click “Next”
  4. Screen shows a “Internal server error”

Form settings

Craft CMS version

Craft Pro 4.12.3

Plugin version

2.1.30

Multi-site?

Yes

Additional context

Happens both on dev and production environments. This is what the log file shows:

[web.ERROR] [TypeError] verbb\formie\base\Integration::getFormSettingsHtmlVariables(): Argument #1 ($form) must be of type verbb\formie\elements\Form, verbb\formie\models\Stencil given, called in /var/www/html/vendor/verbb/formie/src/base/EmailMarketing.php on line 56 {
"trace":[
"#0 /var/www/html/vendor/verbb/formie/src/base/EmailMarketing.php(56): verbb\\formie\\base\\Integration->getFormSettingsHtmlVariables(Object(verbb\\formie\\models\\Stencil))",
"#1 /var/www/html/vendor/twig/twig/src/Extension/CoreExtension.php(1754): verbb\\formie\\base\\EmailMarketing->getFormSettingsHtml(Object(verbb\\formie\\models\\Stencil))",
"#2 /var/www/html/vendor/craftcms/cms/src/helpers/Template.php(158): Twig\\Extension\\CoreExtension::getAttribute(Object(craft\\web\\twig\\Environment), Object(Twig\\Source), Object(verbb\\formie\\integrations\\emailmarketing\\Mailchimp), 'getFormSettings...', Array, 'method', false, false, false, 68)",
"#3 /var/www/html/storage/runtime/compiled_templates/4c/4c57f9d8accd4e5893fae96348b686c7.php(279): craft\\helpers\\Template::attribute(Object(craft\\web\\twig\\Environment), Object(Twig\\Source), Object(verbb\\formie\\integrations\\emailmarketing\\Mailchimp), 'getFormSettings...', Array, 'method', false, false, false, 68)",
"#4 /var/www/html/vendor/twig/twig/src/Template.php(393): __TwigTemplate_2a3b5d821a311396c981efc6e639e216->doDisplay(Array, Array)",
"#5 /var/www/html/storage/runtime/compiled_templates/58/58a8b6c1774cf31ae2277101ba190b72.php(206): Twig\\Template->yield(Array)",
"#6 /var/www/html/vendor/twig/twig/src/Template.php(437): __TwigTemplate_3cc76b72b985da5beee12eabb0e6b82a->block_content(Array, Array)",
"#7 /var/www/html/storage/runtime/compiled_templates/68/682223c56520f2a4105b028ceca72b55.php(645): Twig\\Template->yieldBlock('content', Array, Array)",
"#8 /var/www/html/vendor/twig/twig/src/Template.php(437): __TwigTemplate_96d4a0c496cab75c2fc67e484572f322->block_main(Array, Array)",
"#9 /var/www/html/storage/runtime/compiled_templates/68/682223c56520f2a4105b028ceca72b55.php(386): Twig\\Template->yieldBlock('main', Array, Array)",
"#10 /var/www/html/vendor/twig/twig/src/Template.php(437): __TwigTemplate_96d4a0c496cab75c2fc67e484572f322->block_body(Array, Array)",
"#11 /var/www/html/storage/runtime/compiled_templates/1b/1b3ac7c9c2bb12432f9600ed13a3065c.php(99): Twig\\Template->yieldBlock('body', Array, Array)",
"#12 /var/www/html/vendor/twig/twig/src/Template.php(393): __TwigTemplate_ff0d907e1b09ffb8a41404ca6e7b424c->doDisplay(Array, Array)",
"#13 /var/www/html/storage/runtime/compiled_templates/73/73bc1242af6b7b01d8a80c649e0c1f52.php(61): Twig\\Template->yield(Array, Array)",
"#14 /var/www/html/vendor/twig/twig/src/Template.php(393): __TwigTemplate_4055bdaf6d952dad51e33439a4474591->doDisplay(Array, Array)",
"#15 /var/www/html/storage/runtime/compiled_templates/68/682223c56520f2a4105b028ceca72b55.php(186): Twig\\Template->yield(Array, Array)",
"#16 /var/www/html/vendor/twig/twig/src/Template.php(393): __TwigTemplate_96d4a0c496cab75c2fc67e484572f322->doDisplay(Array, Array)",
"#17 /var/www/html/storage/runtime/compiled_templates/58/58a8b6c1774cf31ae2277101ba190b72.php(62): Twig\\Template->yield(Array, Array)",
"#18 /var/www/html/vendor/twig/twig/src/Template.php(393): __TwigTemplate_3cc76b72b985da5beee12eabb0e6b82a->doDisplay(Array, Array)",
"#19 /var/www/html/vendor/twig/twig/src/Template.php(349): Twig\\Template->yield(Array, Array)",
"#20 /var/www/html/vendor/twig/twig/src/Template.php(364): Twig\\Template->display(Array)",
"#21 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(35): Twig\\Template->render(Array)",
"#22 /var/www/html/vendor/twig/twig/src/Environment.php(306): Twig\\TemplateWrapper->render(Array)",
"#23 /var/www/html/vendor/craftcms/cms/src/web/View.php(495): Twig\\Environment->render('formie/settings...', Array)",
"#24 /var/www/html/vendor/craftcms/cms/src/web/View.php(548): craft\\web\\View->renderTemplate('formie/settings...', Array)",
"#25 /var/www/html/vendor/craftcms/cms/src/web/TemplateResponseFormatter.php(57): craft\\web\\View->renderPageTemplate('formie/settings...', Array, 'cp')",
"#26 /var/www/html/vendor/yiisoft/yii2/web/Response.php(1109): craft\\web\\TemplateResponseFormatter->format(Object(craft\\web\\Response))",
"#27 /var/www/html/vendor/craftcms/cms/src/web/Response.php(339): yii\\web\\Response->prepare()",
"#28 /var/www/html/vendor/yiisoft/yii2/web/Response.php(340): craft\\web\\Response->prepare()",
"#29 /var/www/html/vendor/yiisoft/yii2/base/Application.php(390): yii\\web\\Response->send()",
"#30 /var/www/html/web/index.php(12): yii\\base\\Application->run()",
"#31 {main}"
engram-design commented 1 month ago

Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-4 as 2.1.30".

rinusvandam commented 1 month ago

@engram-design wow that was fast. Can confirm everything works again. Thanks a lot!

engram-design commented 1 month ago

Fixed in 2.1.31