I've been wondering why we do this for quite some time, as it's especially problematic when you're viewing an order for the sake of updating its state ... you can't actually see the effect of that form, because the destination redirects you back to /admin/commerce/orders.

Let's update this default View and untoggle the "Include destination" checkbox on that field configuration. Good riddance. 😅

CommentFileSizeAuthor
#2 3193436-2.patch1.67 KBjsacksick
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama created an issue. See original summary.

jsacksick’s picture

Status: Active » Needs review
FileSize
1.67 KB

It actually makes sense to keep the destination for some operations...

For example, resending the order receipt (If you remove the destination, after clicking on "Resend receipt" ,you remain on the confirm form which is kind of weird).

It probably also makes sense to keep the destination when Reassigning an order, or "unlocking" it.

I'm not sure about "edit" though...

If edit shouldn't append the destination as well, then we need to alter the parent operation url from the OrderListBuilder().

Attaching a patch that disables the destination option from the view.

Note that this doesn't include an update hook on purpose since I don't want to risk reverting people's customizations.

jsacksick’s picture

Not sure about "Reassign" actually :), but makes sense to keep the destination for other operations.

rszrama’s picture

For edit, I think it would most naturally go to the "View" page so you can verify that the desired change was properly saved. I suppose "Reassign" is a subset of "Edit", so I don't mind that also going to the "View" page. For the receipt / unlocking, I think it's fine to keep the destination.

  • jsacksick committed 651a5f7 on 8.x-2.x
    Issue #3193436 by jsacksick, rszrama: Stop including the destination on...
jsacksick’s picture

Status: Needs review » Fixed

Committed!

Status: Fixed » Closed (fixed)

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