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.
Comment | File | Size | Author |
---|---|---|---|
#15 | 2842435-15.patch | 2.9 KB | jrockowitz |
| |||
#12 | 2842435-12.patch | 4.41 KB | jrockowitz |
| |||
#10 | 2842435-10.patch | 3.46 KB | jrockowitz |
webform-node-notes-routing.patch | 1.04 KB | moustachu | |
|
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer commentedMy 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.
Comment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer commented@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!!!
Comment #5
moustachu CreditAttribution: moustachu commentedHello All,
I'm currently struggle with deadline on my project but I will definitly reproduce this with a clean environment and add more info.
Comment #6
jrockowitz CreditAttribution: jrockowitz as a volunteer commentedComment #7
shefki CreditAttribution: shefki commentedHi,
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
Comment #8
jrockowitz CreditAttribution: jrockowitz as a volunteer commentedComment #9
jrockowitz CreditAttribution: jrockowitz as a volunteer commentedHere are the steps required to reproduce this issue...
Now that I can replicate the issue, I will review the patch. I think it might need some tweaking.
Comment #10
jrockowitz CreditAttribution: jrockowitz as a volunteer commentedComment #12
jrockowitz CreditAttribution: jrockowitz as a volunteer commentedComment #14
jrockowitz CreditAttribution: jrockowitz as a volunteer commentedPlease download or checkout the latest dev release to review.
Comment #15
jrockowitz CreditAttribution: jrockowitz as a volunteer commentedTrying a slightly better approach.
Comment #17
jrockowitz CreditAttribution: jrockowitz as a volunteer commentedComment #19
wiifmJust came across this now, is it possible to release a new beta? This seems like fairly critical stuff that needs to work.
Comment #20
jrockowitz CreditAttribution: jrockowitz as a volunteer commentedI am planning on doing a release this week. There is a patch available and the latest dev is stable,
Comment #21
wiifmThanks @jrockowitz!