Problem/Motivation
After editing the Dashboard layout, users are redirected to the Admin > Structure > Dashboard page.
They should be redirected back to where they were (i.e. to the Dashboard page, not in structure).
Steps to reproduce
- Login as admin
- Go to
/admin/dashboard - Click on + Edit layout
- Either change and save or do nothing and discard, it does not matter
- Submit (or discard and confirm)
- Result: you are redirected to
/admin/structure/dashboard - Expectation: being redirected back to the Dashboard page you were before clicking on "Edit layout"
Proposed resolution
Redirect to the Dashboard page after the Layout edit form was submitted.
Maybe as simple as setting the ?redirect query string in the Edit layout button 🤷.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | simplescreenrecord.mkv | 699.6 KB | koustav_mondal |
Issue fork dashboard-3500368
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
phenaproximaThis seems to be squarely in Dashboard's wheelhouse; moving to their issue queue.
Comment #3
tim.plunkettComment #4
sayan_k_dutta commentedWorking on it.
Comment #5
sayan_k_dutta commentedMade the requested changes. Please review.
Comment #7
penyaskitoComment #9
penyaskitoClosing #3500070: Add destination parameter for Edit layout local action as duplicated.
Comment #10
sayan_k_dutta commentedMade the changes and added tests. Please review.
Comment #11
koustav_mondal commentedInstalled the module and checked in local. After editing the Dashboard layout it is now redirected back to the Dashboard page( admin/dashboard) , not in structure(admin/structure/dashboard). Attaching a video for referance. LGTM+
Comment #12
penyaskitoAfter a new review this makes lots of sense. I misread the MR.
However, we can just do this in
\Drupal\dashboard\Plugin\SectionStorage\DashboardSectionStorage::getRedirectUrlSomething like this should work.
Other changes should not be necessary, aside of the added test.
Comment #13
sayan_k_dutta commentedComment #14
penyaskitoThis LGTM. Would love @plopesc to verify it too.
Comment #15
penyaskitoComment #18
plopescIt looks good to me!
Took the freedom to merge it.