WorkspacePublishForm $redirectDestination parameter appears not to be used

Created on 22 July 2023, over 1 year ago
Updated 28 July 2023, over 1 year ago

Problem/Motivation

This is linked to the work to "Inject redirect.destination service". See #3123214. It was apparent that it was linked until the cause of an error was investigated.

The destination query parameter is helpful to override the default redirect after an operation is performed but it's absence should not cause an error unless justified. I see no justification for this.

The error logs indicate the following error is triggered:

NOTICE: PHP message: Uncaught PHP Exception Error: "Call to a member function getAsArray() on null" at /data/app/core/modules/workspaces/src/Form/WorkspacePublishForm.php line 144
{ "timestamp": "2023-07-22T12:31:31+0000", "fields": { "client_ip": "-", "remote_addr": "127.0.0.1", "remote_user": "", "request_uri": "/admin/config/workflow/workspaces/manage/stage/publish", "status": "500", "body_bytes_sent": "0", "request_time": "0.280", "http_referrer": "", "http_user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36", "request_id": "-", "cpu": "64.27", "memory": "4194304", "headers": { "Cache-Control": "must-revalidate, no-cache, private"} } }

Steps to reproduce

  • Enable workspaces module.
  • Visit /admin/config/workflow/workspaces/manage/stage/publish and you will see the error message "The website encountered an unexpected error. Please try again later.".

Adding the ?destination query parameter even without a value set will not cause an error: /admin/config/workflow/workspaces/manage/stage/publish?destination

Proposed resolution

Allow the user to be directed to the valid url /admin/config/workflow/workspaces/manage/stage/publish without a query parameter set.

πŸ› Bug report
Status

Fixed

Version

10.1 ✨

Component
WorkspacesΒ  β†’

Last updated about 18 hours ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom nlisgo

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

Comments & Activities

Production build 0.71.5 2024