[Drupal 9.x] Declaration of Drupal\webform\Plugin\DevelGenerate\WebformSubmissionDevelGenerate::validateDrushParams($args) must be compatible with Drupal\devel_generate\DevelGenerateBaseInterface::validateDrushParams(array $args, array $options = Array)

Created on 29 June 2020, about 4 years ago
Updated 29 July 2024, about 1 month ago

Because of [issue 324: Signature of DevelGenerateBaseInterface::validateDrushParams() different in 8.x-2.1 and 4.0.0, causing fatal Declaration of ... must be compatible error., if you use webform 8.x-5.x-dev with Devel's devel_generate module version 4.0.0, you get:

Fatal error: Declaration of Drupal\webform\Plugin\DevelGenerate\WebformSubmissionDevelGenerate::validateDrushParams($args) must be compatible with Drupal\devel_generate\DevelGenerateBaseInterface::validateDrushParams(array $args, array $options = Array).

when submitting a form which has an email handler.

This is mitigated by the fact that it is not a good idea to enable devel_generate on production, so this probably won't happen in production, but on dev/stage servers with devel_generate enabled, it will cause fatal errors.

I cannot think of a workaround; perhaps it is best to remove Drupal\webform\Plugin\DevelGenerate\WebformSubmissionDevelGenerate entirely until devel issue 324 is fixed?

Setting to major because this might cause webforms to not work on critical environments if devel_generate is enabled.

🐛 Bug report
Status

Fixed

Version

6.2

Component

Code

Created by

🇨🇦Canada alberto56

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada dadderley Vancouver

    I just encountered this problem.

    Drupal version : 10.2.5
    Default theme : swz
    Admin theme : claro
    PHP version : 8.1.27

    I have several forms and they all sent email as they should.
    The site uses the SMTP module and it works well for email.

    Very recently, the existing forms stopped working.

    The forms collected data, but showed a 500 error on submission.
    There were no SMTP messages indicating a failure or success in the sending of emails.

    I came across this thread and This rang a bell

    when submitting a form which has an email handler.

    This is mitigated by the fact that it is not a good idea to enable devel_generate on production, so this probably won't happen in production, but on dev/stage servers with devel_generate enabled, it will cause fatal errors.

    As it turned out, on this site I had left the Devel Generate module installed.

    I uninstalled it and the problem immediately disappeared.

  • 🇬🇧United Kingdom Lincoln-Batsirayi

    I had the same issue as in #49 where we'd left devel_generate enabled on stage and disabling it fixed the issue of the dead screen upon submitting the form.

  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    I think the problem you are facing is fixed in 🐛 Incompatibility with devel ^5.2 RTBC .

Production build 0.71.5 2024