- 🇳🇿New Zealand john pitcairn
Why do we force-redirect to the overview page, when it's entirely possible that the source was not the overview page? Hard coding this in the form
save()
method makes a poor experience.The preferred workflow would be for the overview page to add a redirect parameter to its edit action links, and for the edit action on the subscription view page to redirect to the view page. Then the user will end up where they expected to be, ie where they initiated the edit.
- last update
about 2 years ago 70 pass -
jsacksick →
committed 27a0bf91 on 8.x-1.x
Issue #3214194 by Daniel Korte, John Pitcairn, jsacksick: Poor redirect...
-
jsacksick →
committed 27a0bf91 on 8.x-1.x
- Status changed to Fixed
11 months ago 7:37am 10 July 2024 - 🇮🇱Israel jsacksick
The order form has the following code:
$form_state->setRedirect('entity.commerce_order.canonical', ['commerce_order' => $this->entity->id()]);
This is what the product form does:
if (!empty($form_state->getTriggeringElement()['#continue'])) { $form_state->setRedirect('entity.commerce_product_variation.collection', ['commerce_product' => $product->id()]); } else { $form_state->setRedirect('entity.commerce_product.canonical', ['commerce_product' => $product->id()]); }
I think we should mimic what the order module is doing, I'll commit a slightly different version of the patch from #4 which doesn't attempt the redirection to the subscription collection since this is already covered by the destination parameter which is appended on the edit link.
Automatically closed - issue fixed for 2 weeks with no activity.