Make Webform work on Drupal 11.3.

Original report

Applying a recipe that includes Webform, on Drupal 11.3.0-beta1, breaks horribly. Two errors.

First, you get this:

The hook update_dependencies on class Drupal\webform\Hook\WebformInstallUpdateHooks does not support attributes and must remain procedural.

Then, when the recipe runner tries to roll back the recipe, it hits a snag where Webform calls an undefined _webform_config_delete() function.

But in general, Webform is not passing tests on the next minor of core, as you can see: https://git.drupalcode.org/project/webform/-/jobs/7303324

Issue fork webform-3559837

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

phenaproxima created an issue. See original summary.

phenaproxima’s picture

Issue summary: View changes

anruether’s picture

I can confirm this with 11.3.0-rc1
The patch does not apply to 6.3.x-dev anymore.

liam morland’s picture

Status: Active » Needs work
Issue tags: +Needs reroll

The merge request title is "Try to reduce PHPStan whining". We don't need to fix all the phpstan issues at the moment. We just need to get Webform working on Drupal 11.3.

berdir’s picture

The update dependencies issues has been fixed elsewhere, most changes here seem to be deprecation fixes, the only thing I'm not sure about is the loadIncludes bit, but that would also already be broken on earlier versions then?

berdir’s picture

Looking at the remaining test fails after #3563385: Correct conditional in aria-describedby workaround, I can only see 2-3 distinct failures on next minor and none of them seem to be related to the changes here.

* The undefined property thing. This is a weird PHP bug triggered by PHP notices that I'm seeing pop up more often. The workaround is not using the magic ->entity accessor. It's scary and will cause headaches, but specific test failures are usually easy to fix. See #3518668: Use Fibers for rendering views rows. Also had to fix it in paragraphs: #3562990: Avoid fiber related test failure in Drupal 11.3 and other test fixes.
* The dependency on the field.storage.body field which has been removed. the recommended change is defining your own field storage with a different name, preferably just a text_long and not a summary field. Then it is backwards and future compatible.
* An aria-described-by related test failure in the other issue, which might be in scope of fixing there.

milan.durovic’s picture

Hi all,

it's been 2 weeks since the last update and more than a month since it was reported and classified as critical. It's stalling upgrades to 11.3.x. Is anyone working on fixing this issue?

I know it's not a commercial product, but it would be good to share some info on what's happening at the moment, for those who depend on this module?

liam morland’s picture

Title: Webform is broken on Drupal 11.3.0-beta1 » Webform is broken on Drupal 11.3
Issue tags: +Needs issue summary update

The issue summary needs to be updated with all the ways that Webform is broken on Drupal 11.3; #7 is a good starting point. The merge request should be rebased, but it probably includes changes that are out-of-scope. This issue should be just about getting Webform to work on Drupal 11.3, starting with getting the tests to pass and then any other incompatibilities that are not identified by testing.

The aria-describedby issue was fixed in #3563385: Correct conditional in aria-describedby workaround.

Issues that are just about phpstan messages will be fixed in #3565161: Fix issues raised by phpstan. Some issues have already been fixed.

berdir’s picture

Status: Needs work » Needs review

I pushed a commit that removes the body field and depending config from the test module. That was added in #2887740: CKEditor Text Area not showing when Webform paragraph is present on Node Edit Form in preview mode and I'm fairly certain it was never needed. It was just there because adding a node type through the UI used to automatically add that, so it was added to the module config.

liam morland’s picture

Status: Needs review » Active
Issue tags: -Needs reroll

Tests are now passing. Are there any other incompatibilities with Drupal 11.3? I note that none of the changes directly address the problems mentioned in the issue summary. Do those problems still appear on the latest version of Drupal 11.3?

Anything that is just about phpstan issues, but not whether it works or not, should be addressed in #3565161: Fix issues raised by phpstan.

berdir’s picture

The problem in the issue summary is outdated and had been fixed already by #3547627: LogicException: The hook update_dependencies does not support attributes. The only non-test problem in 11.3 after that was the aria issue that you committed, I don't think there's anything else that's known and as you said, tests are green. I'd close this.

My suggestion on the MR would be slightly more readable code and if there really is a multi-value webform field, a bit more performant as it does a loadMultiple() in the background, but I think that's very rare. not important to enough to spend more time on IMHO.

liam morland’s picture

Issue summary: View changes
Status: Active » Fixed
Issue tags: -Needs issue summary update

Thanks very much.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

milan.durovic’s picture

So, what's the process now, to get this fix move from dev branch into the main, so that it shows as an available update for the latest Drupal? Does this need to pass some formal testing, and/or it needs to get the approval of the module owner?

liam morland’s picture

You can run the 6.3.x development branch now. The stable release is being discussed in #3530589: Stable Version for Drupal 11. Help on getting the release-blockers fixed would move this forward.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.