We should be using form_state['redirect'] not drupal_goto().

Ran into this issue after adding an additional submit handler in a form alter, trying to redirect the user elsewhere after publishing / unpublishing and the submit handler never runs due to the drupal_goto in publishcontent_toggle_status().

Simple patch, just removes the drupal_goto() call in publishcontent_toggle_status and adds in a $form_state['redirect'] - 'node/' . $node->nid'; into publishcontent_toggle_status_form_submit().

CommentFileSizeAuthor
#2 edit_drupal_goto_in-2812965-1.patch600 bytesrossb89

Comments

rossb89 created an issue. See original summary.

rossb89’s picture

Assigned: rossb89 » Unassigned
Status: Active » Needs review
StatusFileSize
new600 bytes
berliner’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies properly to 7.x-dev and 7.x-1.4.

Works as advertised. Given that this is in "needs review" since almost 2 years without updates and the patch is sufficiently simple, I'll take the liberty of setting this to RTBC.

astonvictor’s picture

Status: Reviewed & tested by the community » Closed (outdated)

D7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.