• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed  Issue with viewing soft deleted messages

Deebs

Well-known member
#1
If I soft delete a message and then click "Show" it takes forever and an age for it to be displayed. I get the little activity display in the top right corner then about 15-20 seconds it actually shows the message.

One of my mods was also performing some testing with soft deleted messages and said the following:

When I try to view a deleted post, the sever ends up timing out. Or that time, it took ages, came up with an "unspecified error" pop-over (like the NEW THREAD pop-over) then reappeared.

If I undelete it though, it comes back quickly enough.
 

Kier

XenForo Developer
Staff member
#2
Can you consistently reproduce this on all threads, or just one in particular? Have you tried different browsers?
 

Deebs

Well-known member
#4
Ok,

Tried FireFox 3.6.8 and IE 8 across threads with 3 posts, 100 posts and greater than 500 posts. The results are consistent. It takes forever to "Show" the message, deleting the message is instant, undeleting the message is also instant.
 

Kier

XenForo Developer
Staff member
#8
I tried this on a 5.5m post db and :eek: yes, you're right!

Thankfully we've found the problem and it was a relatively easy fix.
 

Kier

XenForo Developer
Staff member
#9
If anyone else with a very large number of posts is affected by this, you can apply the following fix:

XenForo_ControllerPublic_Thread, line 292, change this:
PHP:
$postIds = preg_replace('/^post-(\d+)$/', '\1', $postIds);
to this
PHP:
$postIds = array_map('intval', preg_replace('/^post-(\d+)$/', '\1', $postIds));