This issue is simply when managing content from the admin section at admin/content/node.
The original issue was that the ?destination= in the edit links from that page were breaking the $form_state['redirect'] option in the submit handler.
I used a simple unset($_REQUEST['destination']) to avoid this, and allow the Save & Edit button to work properly.
The issue now is that I'm trying to reattach the original ?destination= value to the $form_state['redirect'] so that eventually, after they actually save or publish the node, it WILL redirect them back to the proper admin/content/node rather than the node view page.
Minor issue, but still needs to be worked out.
Comments
Comment #1
himerus CreditAttribution: himerus commentedComment #2
mojo78 CreditAttribution: mojo78 commentedI had a similar problem, i.e. a previously-set destination was causing a problem when i wanted to redirect a completed form through another url.
The solution i implemented (which works, but would love to hear a more "drupal-ish" way of doing it) was:
Comment #3
himerus CreditAttribution: himerus commentedI had pulled up this issue a couple weeks back to make an attempt at it, and only spent a short bit of time on it before giving up for now...
The main issue is in this situation, the module is using $form_state['redirect'] to set where the form should go if the save & edit button was used.
The real issue presents itself if:
In order to make this work, I need to continue to pass along the $destination every time it exists to the next node form, so that after hitting save & edit 100 times or more that it would still take you back to the original page you entered from, in this case admin/content/node.
I may actually pull this up again here in a moment and test another method. I may have figured it out just by talking about the issue again!
Comment #4
himerus CreditAttribution: himerus commentedOkay, I magically fixed this in 6.x-1.5.
The $form_state['redirect'] had given me issues before, and I finally found the solution that let me continue to pass the ?destination to EACH subsequent call to the Save & Edit button, and no matter how many times you Save & Edit, you will eventually end up back at admin/content/node if that is where you started your edit from.
I was having issues with the redirection being sent to a page not found until I set the 'absolute' to TRUE, then it worked like a charm... tested, committed, tagged.