Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#6008 closed defect (fixed)

After deleting post, there should be a redirect to /blog

Reported by: Ryan J Ollos Owned by: osimons
Priority: normal Component: FullBlogPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

After deleting a post named TestPost, the page /blog/TestPost was displayed.

It seems like there should be a redirect to /blog after deleting a post.

Attachments (1)

TestPost.png (43.3 KB) - added by Ryan J Ollos 14 years ago.

Download all attachments as: .zip

Change History (8)

Changed 14 years ago by Ryan J Ollos

Attachment: TestPost.png added

comment:1 Changed 14 years ago by osimons

I sort-of agree. It is however how it has been done in the other modules like ticket and wiki. The "Not Found" page is kind of a confirmation that the delete succeeded. However, with recent Trac that can also save warnings and re-display after redirect, I think perhaps seeing a green box with "Blog post 'TestPost' deleted." to be just as useful - and will work fine for a straight /blog redirect.

Can't quite remember what Trac version the saving of warnings was added, but older Trac 0.11.x is not so high on my priority list anyway - it will work regardless. I'll fix it.

comment:2 Changed 14 years ago by osimons

Resolution: fixed
Status: newclosed

(In [6795]) FullBlogPlugin: Improving information and redirect logic when deleting blog comments, version of posts or whole posts. When a post is completely removed, it will redirect to blog front-page as requested by #6008.

Note: Actual display of the notices after redirect requires a fairly recent Trac 0.11.x as feature was added in the branch.

Closes #6008.

comment:3 Changed 14 years ago by Ryan J Ollos

Thanks for adding this feature so quickly.

It looks like add_notice is the function that was added in 0.11.x. I was trying to determine if this was available as of 0.11.4 since that is the Trac version my hosting provider is currently running, and it looks like it was added in 0.11.0.

Does that sound correct to you?

Reference: wiki:/TracDev/ApiChanges/0.11#Newinthe0.11API

comment:4 Changed 14 years ago by osimons

Both add_notice() and add_warning() was present in 0.11.0 - I worked on that feature myself.

However, the warnings were just stored in chrome data, so if you then redirected any warnings and notices were discarded (it is after all a completely new request, and not a response for the current request). With a recent trac, the redirect() call will gather any warnings and notices and store it in user session - and retrieve and display them again on the next request. That feature is fairly recent.

comment:5 in reply to:  4 ; Changed 14 years ago by anonymous

Replying to osimons:

However, the warnings were just stored in chrome data, so if you then redirected any warnings and notices were discarded (it is after all a completely new request, and not a response for the current request). With a recent trac, the redirect() call will gather any warnings and notices and store it in user session - and retrieve and display them again on the next request. That feature is fairly recent.

This sounds like ticket:8611, in which case the feature was added in 0.11.5. Does that sound right to you?

It also sounds like there is not a backwards compatibility issue, just that the nice message you have added depends on the feature in 0.11.5.

comment:6 in reply to:  5 ; Changed 14 years ago by Ryan J Ollos

Replying to anonymous:

This sounds like ticket:8611, in which case the feature was added in 0.11.5. Does that sound right to you?

Sorry, I meant ticket:8166. Ironically, 8611 was reported by me.

comment:7 in reply to:  6 Changed 14 years ago by osimons

Replying to rjollos:

Sorry, I meant ticket:8166.

That's the one. And yes, no side-effects other than the fact that messages won't appear - and seeing there were no visual feedback before my recent change, I doubt anyone on older versions will notice :-)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.