Missing topic efter database crash

Started by Paracelsus, August 29, 2016, 04:04:59 AM

Previous topic - Next topic

Paracelsus

Hi,

Yesterday our SMF database crashed (still unclear why, but we're checking it) and after the forum came back online there was one topic missing. There may be more but that one is particularly important and it's impossible to access it through the URL, you get that error message saying that the topic or board you're looking for doesn't seem to exist.

In smf_messages through phpmyadmin I can see that the whole topic is still there, so I guess that the problem lies in some other table relating to that topic that has some corrupted data. Already tried the maintenance script to find and fix errors, but nothing can be found to be repaired.

So, how can I have the topic back without having to go for a backup? (since this would mean losing many hours of posts) Thanks in advance.

Illori

does the topic exist in the topics table? if it is not in the topics table that is why you cant call the topic by URL.

Paracelsus

Quote from: Illori on August 29, 2016, 05:15:44 AM
does the topic exist in the topics table? if it is not in the topics table that is why you cant call the topic by URL.

Thanks for the prompt reply Illori. You're right indeed, just checked smf_topics and it is missing there... how do I recreate that row?

Illori

does it exist in your backup? if so restore that row. otherwise you may be out of luck.

Paracelsus

Quote from: Illori on August 29, 2016, 05:39:58 AM
does it exist in your backup? if so restore that row. otherwise you may be out of luck.

But if the row in the backup has different values in columns like id_last_msg, num_replies, num_views will it still work? (since the backup is offset with the time of the crash)

Paracelsus

Actually, checking both smf_topics and smf_messages, the only values I can't retrieve exactly are num_views. First and last messages are registered in smf_messages if you go for the oldest and most recent from poster_time. Number of replies I guess it would be possible to retrieve the total of rows on smf_messages restricted to the topic id, unsure if they need approved status as 1 to be counted in num_replies.

Would it be possible to recreate the row putting a fake value in num_views? Would that make the topic accessible?

Paracelsus

Just to sum up, my question is, can I use phpmyadmin to create the missing row like in the attached image assuming I know the almost every value for each parameter except maybe num_views and possibly num_replies and get a working link for the topic (since it exists on smf_messages)?

Illori

do a backup and try. if it fails you have a backup you can restore.

vbgamer45

Yes you can recreate the topic in smf_topics table I have done it before and it works
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Paracelsus

Ok, so now I've tried and it worked, great! Big thanks to all for your help.

(marking as solved)

Advertisement: