There is now a delete link in the node links but it sends you back to the node again when you delete, which gets you a 404 since the node no longer exists.

Michelle

Comments

apanag’s picture

I think the return link has to be the container in which the post was.

Is it possible to provide via admin interface various options for the return link? For example the return link may be the forum first page, or the container, or the user profile, or a custom link etc.

What do you think?

apanag

michelle’s picture

Normal Drupal behavior is to take you to the front page. I think it best to follow that so it's consistent.

Michelle

apanag’s picture

What happened if someone wants to change the default behavior?
Has to use hook_alter_form or hacking the module?

Isnt it somewhat restricted ?

michelle’s picture

They'd do whatever they do to change the behavior elsewhere, I guess. I don't think it's restricted and it would be quite confusing if the delete button I add to the node links acts differently than if you click on edit and then click delete.

Michelle

apanag’s picture

I have to agree that it would be confusing.

However i am curious "They'd do whatever they do to change the behavior elsewhere". Where is the "elsewhere" you are refferring to? Is it possible via a hook function? an api of yours? something else?

michelle’s picture

I have no idea. I've never tried to change the default node deletion behavior of Drupal. I don't know if it's possible. All I'm saying is that, if I make this link act the same as the rest of Drupal, and someone wants to change it, they'd have to do the same thing as they do in the rest of Drupal.

Michelle

savioret’s picture

I think the solution is simple :

- If the comment to delete is the topic itself, the delete link destination should point to the parent topic list. (because the topic doesn't exist anymore).
- If the comment is any secondary comment of the topic, the link remains as now, pointing to the topic again.

It's just a logical solution. What do you think ?

michelle’s picture

Yes, the solution is very simple. It needs to do the same thing as core so it behaves the same as the rest of the site. I am not going to change this behavior for AF.

Michelle

savioret’s picture

Michelle, core redirects to the site index if you delete a node, and redirects to the node if you delete a comment.
The topic is a node.
I'm using alpha1. At least in that version when you delete the topic you get redirected to the topic itself.

michelle’s picture

@birwel: Yes, that is why we have this bug report.

Michelle

Adam S’s picture

I just noticed that deleting the top thread leads to a 404 because there is destination parameter set in the url.

EDIT: I was thinking a couple days ago how silly it is that I can't delete a post on drupal.org. After dealing with this 404 redirect problem with the forum thread delete I decided that I just will not let people delete any threads that they start. They can still delete comments to the thread. Oh, well. It would be nice. @Michelle, have you had any luck with integrating notifications with advanced forum?

michelle’s picture

@adamsohn: It works fine if you use regular comments. Making it work with Nodecomment is beyond me right now.

Michelle

michelle’s picture

Status: Active » Fixed

Fix committed.

Michelle

Status: Fixed » Closed (fixed)

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