Bad use of destination param on manage templates table

Created on 29 September 2023, 12 months ago
Updated 7 October 2023, 12 months ago

Problem/Motivation

Every time I add/modify a field in a Webform template and the destination parameter is present in the URL, it redirects me to /admin/structure/webform/templates/manage so it is a bit inconvenient to have to search for the template again and click on 'Build' again

Additionally, Drupal, when you add a field to a content type, redirects you to admin/structure/types/manage/{content_type}/fields and not to /admin/structure/types, so continuing to add fields is more comfortable in that sense.

I have tried to do the same by removing the destination parameter (?destination=/en/admin/structure/webform/templates/manage)
and the redirection does as I expect, so I think that perhaps this parameter is not necessary

Steps to reproduce

  1. Via UI, go to Structure > Webforms > Templates > Manage
  2. Click Build in any Webform template
  3. The param destination is present in the URL (?destination=/en/admin/structure/webform/templates/manage)
  4. Add/edit an element
  5. After this, redirects you to /admin/structure/webform/templates/manage

Proposed resolution

Given that if we remove the destination parameter from the URL works as expected, I propose to remove the ensureDestination function from the WebformTemplatesController class (webform_templates module).

✨ Feature request
Status

Fixed

Version

6.1

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain cmarrufo

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

Comments & Activities

Production build 0.71.5 2024