verbb / formie

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

Undefined variable $entryType breaking element integration in Craft 5 #1916

Closed mike-moreau closed 1 week ago

mike-moreau commented 2 weeks ago

Describe the bug

Attempting to connect a form with an Elements integration in Craft 5 is resulting in the following error for me:

Failed to trigger integration: ["Element integration failed for submission “148”. Error: Undefined variable $entryType .../vendor\/verbb\/formie\/src\/integrations\/elements\/Entry.php:238"].

Steps to reproduce

  1. Create a form
  2. Set up elements integration
  3. Submit the form, the queue job should fail with this error

Form settings

Craft CMS version

5.1.9

Plugin version

3.0.0-beta.14

Multi-site?

No

Additional context

No response

mike-moreau commented 2 weeks ago

I wonder if this line 238 should be $entry instead of $entryType?

$siteSettings = ArrayHelper::firstWhere($entry->section->getSiteSettings(), 'siteId', $entry->siteId);
engram-design commented 2 weeks ago

Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.0-beta.14".

engram-design commented 1 week ago

Fixed in 3.0.0-beta.15