Problem/Motivation

There is route for webform submissions, which allows to browse all submission, if it has wizard pages. But if we have translation for the webform, then this route is inaccessible, because checkWizardPagesAccess() method checks raw 'elements' and searches for occurrences of such strings, as "'#type': webform_wizard_page" or "'#type': webform_card", but in case of translation, we don't have such strings, because 'type' attribute is not translatable, so for translation we have e.g. 'title' or 'placeholder' attributes.

Steps to reproduce

1. Make sure there are at least 2 languages on this site.
2. Create webform and add Wizard page element and some other elements.
3. Add translation to the webform.
4. Submit webform.
5. Check path like 'admin/structure/webform/manage/[webform_id]/submission/1/edit/all' under both languages.

Proposed resolution

Make such pages accessible.

Comments

ilya.no created an issue. See original summary.

ilya.no’s picture

Attaching initial patch. Updated checkWizardPagesAccess() to use hasWizardPages(), as it seems to be logical. On the other hand using strpos is less resource consuming, but when translated elements are returned, then it's useless. Is there any better idea?

ilya.no’s picture

Status: Active » Needs review
jrockowitz’s picture

StatusFileSize
new1.19 KB

This problem is related to #3162592: Webform Cards not working for translations of webform. Attached is a similar solution.

jrockowitz’s picture

StatusFileSize
new2.94 KB
jrockowitz’s picture

Status: Needs review » Reviewed & tested by the community

  • jrockowitz authored 1240d85 on 8.x-5.x
    Issue #3163980 by jrockowitz, ilya.no: 'Edit all' route for a submission...
jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

  • jrockowitz authored 1240d85 on 6.x
    Issue #3163980 by jrockowitz, ilya.no: 'Edit all' route for a submission...

Status: Fixed » Closed (fixed)

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