Hello again,

the delete link of links is /node/X/delete?destination=node/X

Doesn't make sense that a delete link gets a destination parameter.

The destination doesn't exist after the delete.

Clear?

Thanks

Yannick

Comments

teezee’s picture

Makes sense...

I'll try to find the correct statement to skip the destination.

1. Delete link must still have a destination set when you would click the node-delete link from an overview page with node teasers, but:
2. Delete link shouldn't have a destination set to node/$nid where $nid is the same as the node about to be deleted.

teezee’s picture

Status: Active » Needs review
StatusFileSize
new559 bytes

Patch removes the 'query' part of the link array by default. It adds the 'query' part of the link conditionally.
Do NOT add a destination that points to the node when:

  • $_GET['q'] points to node/$nid (where $nid is it's own node ID)
  • $node->body is set

In teaser mode the $node->body is not set, but in full page mode it is. Also, when using revisioning (and viewing node/$nid/revisions/$rev/view) or panel pages for your node view, the $_GET['q'] might not be node/$nid, but it likely is a page where the full node is displayed, and that's where you don't want to end-up after deleting IMHO.

Please test!

philbar’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

vijaycs85’s picture

Version: 6.x-1.0 » 6.x-2.x-dev
Issue summary: View changes
Status: Closed (fixed) » Active

Let's port to 2.x too.

vijaycs85’s picture

Status: Active » Needs review
StatusFileSize
new639 bytes

Initial patch...