Skip to:
Content

Opened 4 years ago

Closed 2 years ago

#2734 closed defect (fixed)

restore trashed topic fails

Reported by: roysmyth Owned by: johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.4
Component: General Keywords: has-patch
Cc: jjjay@…

Description

Attempting to restore a trashed topic results in the message:

Are you sure you want to do this?
Please try again.

The message repeats upon trying again.

A workaround is to select the topic(s) to restore and use Bulk Action to restore.

This has been reported in the support forum. There is supposed to be a ticket, but I can't find one, hence this ticket.

WP 4.0

Attachments (8)

2734.diff (1.6 KB) - added by tharsheblows 4 years ago.
2734.2.diff (1.6 KB) - added by tharsheblows 4 years ago.
sorry, everything got jumbled up in the first one. this one should work.
2734.3.diff (3.1 KB) - added by tharsheblows 4 years ago.
2734.4.patch (3.1 KB) - added by thebrandonallen 3 years ago.
Fix untrash admin links for topics/replies
2734.5.patch (5.2 KB) - added by thebrandonallen 3 years ago.
Removes all redirects on admin links
2734.6.patch (5.2 KB) - added by thebrandonallen 3 years ago.
2734.7.patch (3.8 KB) - added by netweb 3 years ago.
2734.8.patch (5.3 KB) - added by thebrandonallen 3 years ago.

Download all attachments as: .zip

Change History (22)

#1 @tharsheblows
4 years ago

Yes, I had this last night too. It works on the front end but not in admin.

Also, for spam replies using the links on the list page, clicking "Approve" changes the status to pending, not published. The "not spam" link works as expected (changes from spam to published). Is this how it is supposed to work?

#2 @tharsheblows
4 years ago

The addition of the query arg _wp_http_referer was causing the problem, so I took it out. Now it matches how WP core does untrashing of posts.

@tharsheblows
4 years ago

@tharsheblows
4 years ago

sorry, everything got jumbled up in the first one. this one should work.

#3 @tharsheblows
4 years ago

  • Cc jjjay@… added
  • Keywords has-patch added; reporter-feedback removed

#4 @netweb
4 years ago

  • Keywords has-patch removed
  • Milestone changed from Awaiting Review to 2.6

I've just spent another 10 minutes trying to find the other ticket "I thought" existed but cannot find it.

Thanks for the patch @tharsheblows, your patch fixes "replies", the original ticket mentions topics not replies ;)

The fix should be pretty close to the same as you've done for replies above, could you refresh the patch and include both topics and replies please :)

#5 @tharsheblows
4 years ago

Ha ha ha, oh dear, story of my life. I'll do topics.

#6 @tharsheblows
4 years ago

And here it is. As always, test it to see what's gone wrong.

@tharsheblows
4 years ago

#7 @tharsheblows
4 years ago

  • Keywords has-patch added

#8 @thebrandonallen
3 years ago

  • Keywords dev-feedback added

Refresh patch for latest trunk.

Something to consider. This will make all of the other BBP admin links inconsistent with the untrash link, along with being inconsistent with WP's admin links. The redirect doesn't cause the other admin links to fail, but they do cause a change in behavior from admin links for posts and pages.

@thebrandonallen
3 years ago

Fix untrash admin links for topics/replies

@thebrandonallen
3 years ago

Removes all redirects on admin links

#9 @tharsheblows
3 years ago

I think taking off the redirects makes more sense, too. Thanks for updating.

#10 @thebrandonallen
3 years ago

Attached patch refreshes for trunk and adds escaping to the urls.

#11 @thebrandonallen
3 years ago

  • Keywords dev-feedback removed

@netweb
3 years ago

#12 @netweb
3 years ago

Using 2734.6.patch topics and replies can no longer be deleted permanently from the trash in the back end, : Error in moving to Trash. (via the front end works), 2734.7.patch reverts the delete action for topics and replies to the original code so that topics and replies are still deletable from the trash.

#13 @thebrandonallen
3 years ago

Adding 2734.8.patch to fix 2734.6.patch, so that it returns a valid "Delete Permanently" link.

#14 @johnjamesjacoby
2 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 6263:

Admin: Fix restoring/trashing topics & replies.

Fixes #2734. Props tharsheblows, thebrandonallen, netweb.

Note: See TracTickets for help on using tickets.