Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If the "Edit node" link that is added by plugins/content_types/node/node.inc is used to eventually delete a node, the browser will end up at a 404 page at the end because it is being redirected back to the page it just deleted. This happens because CTools unconditionally sets the destination= query string for that link, which is inconsistent with the standard behaviors of the node module. The attached patch corrects this behavior by only setting the query parameter if $_REQUEST['destination'] is set, similar to how node_form_delete_submit() works in node.pages.inc.
Comment | File | Size | Author |
---|---|---|---|
#1 | ctools_node_edit_conditional_redirect_2.patch | 702 bytes | mgriego |
ctools_node_edit_conditional_redirect.patch | 617 bytes | mgriego |
Comments
Comment #1
mgriego CreditAttribution: mgriego commentedAlso discovered that the same thing was happening in plugins/content_types/node_context/node_content.inc. Another patch attached.
Comment #2
mgriego CreditAttribution: mgriego commentedI should actually mention that this is related to the admin_links.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedMakes sense to me. Committed. THanks!
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedAll of the 'to be ported' patches got merged in during the porting sprint in September.