Problem/Motivation

RecipeForm includes a hard-coded redirect back to /admin/modules/browse/recipes. This can lead to a 404 if the recipes source isn't enabled, but even if it is, it might not be the page you came from (if, say, you installed a recipe via a mini-browser on another page). It's from a year ago, when Project Browser looked quite different.

Proposed resolution

The form should redirect back to the page you were on, whose path should be passed to the activate route in a URL query parameter.

This will not need explicit coverage because the desired code path is already verified by the existing tests.

Command icon 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

phenaproxima created an issue. See original summary.

chrisfromredfin’s picture

phenaproxima’s picture

Status: Active » Needs review
Issue tags: +backport
phenaproxima’s picture

Issue summary: View changes
phenaproxima’s picture

Assigned: Unassigned » chrisfromredfin

Assigning to @chrisfromredfin for light manual testing and commit. How to test this:

  • Place a mini-browser block for the recipes source on some other page that isn't a Project Browser page.
  • Use that mini-browser to find and apply a recipe that requires input.
  • Apply the recipe, filling out the required input.
  • You should be redirected back to the original page, not to the /admin/modules/browse/recipes.

chrisfromredfin’s picture

Status: Needs review » Patch (to be ported)

manually tested and confirmed.

chrisfromredfin’s picture

Status: Patch (to be ported) » Fixed

backport complete.

Status: Fixed » Closed (fixed)

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