Problem/Motivation

Hello,

When we try to view the submission list (Results) of a webform attached to node entities we got a PHP Error :

Uncaught PHP Exception Symfony\Component\Routing\Exception\RouteNotFoundException: "Route "entity.node.webform_submission.notes_form" does not exist." at /d8/web/core/lib/Drupal/Core/Routing/RouteProvider.php line 187

We only use webform + webform_ui module and we have some forms that are linked to some node entity with a webform field.
We don't use the webform_node module because we don't want other users to mess with them in the content menus.

I didn't manage to find which commit could have break that but it worked fine in December. This problem isn't happening if there aren't any submissions.

Proposed resolution

Looking at WebformSubmissionListBuilder, I notice some differences in the code for creating routes for "operations" or "tasks".
The problem seems to come from there and I did fix it for my case (see linked patch).

We didn't test the webform_node case and I'm calling an expert to see if this was done in the spirit of the module.

Remaining tasks

  • Check if webform_node (and specially notes) are broken
  • Fix any problem regarding the correct route creation

Regards and thanks to you all (specially Jacob) for the great work and the recurrent updates on this module.

PS : I'm available to do some more test or code but I wanted to see if this speaks to anyone first.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moustachu created an issue. See original summary.

jrockowitz’s picture

Status: Active » Needs review

My gut says your solution is fine.

Let's run the patch through the automated tests and see if it breaks anything.

I probably need to do more testing using the Webform field outside of the Webform node module.

Status: Needs review » Needs work

The last submitted patch, webform-node-notes-routing.patch, failed testing.

jrockowitz’s picture

@moustachu Can you please document the steps required to reproduce this issue so that I can help fix it?

BTW, welcome to the Drupal community!!!

moustachu’s picture

Hello All,

I'm currently struggle with deadline on my project but I will definitly reproduce this with a clean environment and add more info.

jrockowitz’s picture

Status: Needs work » Postponed (maintainer needs more info)
shefki’s picture

Hi,
I have becoming the same error when I clicked "Results" and the patch was working for me too!
Thanks!

Some Informations:
PHP Version: 5.6.27,
Drupal version: 8.2.5
Webform version: 8.x-5.0-beta5

jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Needs review
jrockowitz’s picture

Priority: Normal » Major

Here are the steps required to reproduce this issue...

  • Enable on the Webform and Webform UI modules. (/admin/modules)
  • Add a 'Webform' field to the 'Page' content type. (/admin/structure/types/manage/page/fields)
  • Create a new 'Page' and select the 'Contact' form. (/node/add/page)
  • View the new 'Page' and submit the 'Contact' form (/node/{nid})
  • Goto the 'Contact' form's results. (/admin/structure/webform/manage/contact/results/submissions)

Now that I can replicate the issue, I will review the patch. I think it might need some tweaking.

jrockowitz’s picture

Status: Needs review » Needs work

The last submitted patch, 10: 2842435-10.patch, failed testing.

jrockowitz’s picture

Status: Needs work » Needs review
FileSize
4.41 KB

  • jrockowitz committed 5d6f9e9 on 8.x-5.x
    Issue #2842435 by jrockowitz, moustachu, shefki: entity.node....
jrockowitz’s picture

Status: Needs review » Fixed

Please download or checkout the latest dev release to review.

jrockowitz’s picture

Status: Fixed » Needs review
FileSize
2.9 KB

Trying a slightly better approach.

  • jrockowitz committed b445301 on 8.x-5.x
    Issue #2842435 by jrockowitz, moustachu, shefki: entity.node....
jrockowitz’s picture

Status: Needs review » Fixed

  • jrockowitz committed 24e0028 on 8.x-5.x
    Issue #2842435 by jrockowitz, moustachu, shefki: entity.node....
wiifm’s picture

Just came across this now, is it possible to release a new beta? This seems like fairly critical stuff that needs to work.

jrockowitz’s picture

I am planning on doing a release this week. There is a patch available and the latest dev is stable,

wiifm’s picture

Thanks @jrockowitz!

Status: Fixed » Closed (fixed)

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