This issue occurs when managing content from the admin section at admin/content. After that we have "?destination=/admin/content" in url.
The submit handler for "Save & Edit" button redirects to admin/content but it has to redirect back to the node form again.

I wrote patch to avoid this and allow the Save & Edit button to work properly.

I hope it helps someone solve the issue.

Comments

alex_kukso created an issue. See original summary.

alex_kukso’s picture

StatusFileSize
new485 bytes
prashant.c’s picture

Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new42.03 KB

@alex_kukso

You patch seems to be working fine.
PFA Previously it was throwing error after applying the patch redirect is working fine.

andileco’s picture

Works well for me. Glad it was something simple.

trevorbradley’s picture

Status: Needs review » Reviewed & tested by the community

Works perfectly for me, thanks!

trevorbradley’s picture

Status: Reviewed & tested by the community » Needs work

Hold on... maybe not. The destination shouldn't be removed from the URL after "Save & Edit" is clicked. The user might eventually want to "save" and go back to where they were working.

Let me see if I can whip up a replacement.

trevorbradley’s picture

Status: Needs work » Reviewed & tested by the community

OK, after a good amount of digging, I've changed my mind again. The issues about overriding a destination, as seen in #2950883: Allow form redirects to ignore ?destination query parameter are quite complex.

This fix is 90% sufficient. I'd suggest rolling in this patch (It's far better than nothing!), and if #2950883: Allow form redirects to ignore ?destination query parameter does get passed in some form, then the issues of destroying destination can be re-addressed.

fudeglan’s picture

If you click on Save it will not return it to /admin/content

fudeglan’s picture

wturrell’s picture

Tested fudeglan's patch, both the Save and Save/Edit buttons working correctly in admin/content for me.

  • q__nt_n committed a897222 on 8.x-1.x
    Issue #2932050 by fudeglan, alex_kukso, Prashant.c, q__nt_n: The "Save...
q__nt_n’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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