News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Empty trashcan, random topics get deleted

Started by Mr. Jinx, July 20, 2014, 03:32:52 PM

Previous topic - Next topic

Mr. Jinx

I'm not sure if this is a bug or something weird on my server:

Situation:
All deleted posts end up in the trashcan (yes that is correct :)).
So lets say at some point there are 5 pages of trash in the trashcan.
Once in a while I clean up the trashcan by selecting the last page (page 5), and there I select all trashed posts and delete them for ever.

This takes a few seconds and then you return to the trashcan, but the weird thing is, there are still 5 pages of trash and all pages are full with deleted postings.
If you wait a few minutes, everything will be updates and you will finally see 4 pages left.

However, if you don't know this and select all posts on page 5 again, random normal topics will be deleted!
This has corrupted my forum for the second time now. First time because I didn't know about this, second time because one of the mods didn't know about this.

Anyone experienced this also, or know what is happening?
This is something I have noticed for a long time, so it's is not a recent bug or something.
My forum is pretty large with 600.000 topics.

Kindred

Never seen the before and I run a forum with 2 million posts...

What version of smf?
URL? Mods running?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Mr. Jinx

Currently I'm running 2.0.8, but this is something that I noticed about 2 years ago when I made my first mistake.
Since then, I always wait a few minutes after every delete.

In moderationlog, it shows this (when it goes wrong): Topic "" from "Trashcan" removed
There is no topic id.

1.   Sitemap   2.2.0     [ Overzicht bestanden ] [ Verwijderen ]
2.   Custom Fields on Topic   1.0     [ Deïnstalleer ] [ Overzicht bestanden ] [ Verwijderen ]
4.   Tapatalk SMF 2.0 Plugin   4.0.1     [ Deïnstalleer ] [ Overzicht bestanden ] [ Verwijderen ]
5.   Ohara YouTube Embed   1.0     [ Deïnstalleer ] [ Overzicht bestanden ] [ Verwijderen ]
6.   SMF4Mobile Mod   1.0     [ Deïnstalleer ] [ Overzicht bestanden ] [ Verwijderen ]
8.   detectBrowser Update   1.0     [ Deïnstalleer ] [ Overzicht bestanden ] [ Verwijderen ]
9.   Moderator and Administrator Comment Tags   1.8.1     [ Overzicht bestanden ] [ Verwijderen ]
11.   Bookmarks   2.3     [ Overzicht bestanden ] [ Verwijderen ]
13.   H1 Tags in link tree   1.1     [ Deïnstalleer ] [ Overzicht bestanden ] [ Verwijderen ]
15.   MCLegendII RC3   3.0     [ Deïnstalleer ] [ Overzicht bestanden ] [ Verwijderen ]
17.   Internal Links Use Same Window   1.2     [ Deïnstalleer ] [ Overzicht bestanden ] [ Verwijderen ]
19.   SMF Gallery Lite   3.6a     [ Deïnstalleer ] [ Overzicht bestanden ] [ Verwijderen ]

margarett

There has to be something cached.
Instead of waiting some minutes, can you empty your forum cache and check if the 5th page is gone?

Quote from: Mr. Jinx on July 20, 2014, 03:32:52 PM
However, if you don't know this and select all posts on page 5 again, random normal topics will be deleted!
:o

I've been looking at MessageIndex.php
QuoteIn moderationlog, it shows this (when it goes wrong): Topic "" from "Trashcan" removed
The code says:
// Only log the topic ID if it's not in the recycle board.
logAction('remove', array((empty($modSettings['recycle_enable']) || $modSettings['recycle_board'] != $removeCacheBoards[$topic] ? 'topic' : 'old_topic_id') => $topic, 'board' => $removeCacheBoards[$topic]));

So, it should be correct to not show you the topic ID. The topic *title* on the other hand, should be present...

You can debug what might be happening here with some debug code throughout MessageIndex.php but it looks quite... unique.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Biology Forums

It's a caching thing, I think. I've witnessed it too.

Mr. Jinx

Thanks for the replies. It does seem to be related to caching.

First I tried to empty the forum cache after deleting posts in the trashcan, that worked.
I also tried to disable the forum cache (using apc), and that worked also.

Advertisement: