MyBB Community Forums

Full Version: make a thread with an OLD thread ID and the created time is the past?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Since my forum got a popular thread accidentally deleted by a hacker,
I have to re-create it without backups.

My question is, how could I create a past thread with an old thread ID as well
as the thread got a creation date on 27 July, 2016.

The details:
Old thread: Created on 27 July, 2016, with a link: /newthread.php?fid=29

If I use a forum account create a new thread, the id is no more 29, it is 11987 or latter,
so the link cannot be like above: /newthread.php?fid=29.

I tried to use phyAdmin Mysql to change to the id,
but the forum cannot display the thread.

Why?

Thanks all for help.
This fid=29 is the ID number of forum where you'll post that thread in, but not your thread ID.

If you directly post any content as a new thread, the ID will grow as it's auto-increased each time a new thread is posted.

A thread (without replied posts) has two locations to store it content, in a basic MyBB installation, as in table mybb_threads and mybb_posts (use your table prefix here instead). See these out-dated documents from 1.6 on mybb_threads and mybb_posts, it might be helpful for you.

Always do backup, regularly and before you're doing big operations on your forum. Check this guide.
(2019-09-10, 11:33 AM)Karto Wrote: [ -> ][...]
I tried to use phyAdmin Mysql to change to the id,
but the forum cannot display the thread.

Why?
[...]
It is the right way to work with pypMyAdmin or any other DB tool to edit the values manually.
Change Thread ID (mybb_thread.tid) and timestamp (.dateline).

Such manipulations need a refresh of the caches in ACP.

[ExiTuS]
You have to change the ID for the post as well.

Why don't you have backups?! If you had one (even an older one) you could just restore that one thread from it...
(2019-09-10, 11:53 AM)noyle Wrote: [ -> ]This fid=29 is the ID number of forum where you'll post that thread in, but not your thread ID.

If you directly post any content as a new thread, the ID will grow as it's auto-increased each time a new thread is posted.

A thread (without replied posts) has two locations to store it content, in a basic MyBB installation, as in table mybb_threads and mybb_posts (use your table prefix here instead). See these out-dated documents from 1.6 on mybb_threads and mybb_posts, it might be helpful for you.

Always do backup, regularly and before you're doing big operations on your forum. Check this guide.
Thanks.
I have created a new thread by changing the tid of mybb_threads and mybb_posts,
but the thread is still invisible with the following error messages:

The specified thread does not exist.

When I type the website /showthread.php?tid=29
Why???

Thanks for help.
(2019-09-11, 05:13 PM)Karto Wrote: [ -> ]When I type the website /showthread.php?tid=29

Seems this 29 is the forum ID number where you've posted your thread, as you've mentioned in your first post. Are you sure it's the ID you have changed the thread into? Make sure there's no duplicate records in mybb_threads table of same ID. Check using following SQL in phpMyAdmin:
Query threads of ID=29:
SELECT * FROM mybb_threads WHERE tid = 29
Query posts in under threads ID=29:
SELECT * FROM mybb_posts WHERE tid = 29

(2019-09-11, 05:13 PM)Karto Wrote: [ -> ]The specified thread does not exist.

There would be several reasons for showing this message:
  • The thread with the specific ID doesn't exist, try above SQL to query.
  • The thread with the specific ID is a marked moved thread which is not really a standard thread.
  • The thread is invisible to current user without viewing permission, which is either "soft deleted" or "unapproved".

Make sure you set the thread with an available ID where there's no other threads/posts using it, then check the record you've updated for sure.

I've done the following process and the thread displays without problem:
  1. Create a new thread in a forum, and get an ID of the new thread which is X.
  2. Select an unused thread ID (equivalent to your deleted thread ID, say Y).
  3. In phpMyAdmin, run SQL:
    UPDATE mybb_threads SET tid = Y WHERE tid = X;
    UPDATE mybb_posts SET tid = Y WHERE tid = X;
    
(2019-09-11, 05:45 PM)noyle Wrote: [ -> ]
(2019-09-11, 05:13 PM)Karto Wrote: [ -> ]When I type the website /showthread.php?tid=29

Seems this 29 is the forum ID number where you've posted your thread, as you've mentioned in your first post. Are you sure it's the ID you have changed the thread into? Make sure there's no duplicate records in mybb_threads table of same ID. Check using following SQL in phpMyAdmin:
Query threads of ID=29:
    SELECT * FROM mybb_threads WHERE tid = 29
Query posts in under threads ID=29:
    SELECT * FROM mybb_posts WHERE tid = 29

(2019-09-11, 05:13 PM)Karto Wrote: [ -> ]The specified thread does not exist.

There would be several reasons for showing this message:
  • The thread with the specific ID doesn't exist, try above SQL to query.
  • The thread with the specific ID is a marked moved thread which is not really a standard thread.
  • The thread is invisible to current user without viewing permission, which is either "soft deleted" or "unapproved".

Make sure you set the thread with an available ID where there's no other threads/posts using it, then check the record you've updated for sure.

I've done the following process and the thread displays without problem:
  1. Create a new thread in a forum, and get an ID of the new thread which is X.
  2. Select an unused thread ID (equivalent to your deleted thread ID, say Y).
  3. In phpMyAdmin, run SQL:
    UPDATE mybb_threads SET tid = Y WHERE tid = X;UPDATE mybb_posts SET tid = Y WHERE tid = X;
Thanks a lot bro
It really works by using SQL instructions.
Your help is highly appreciated. Wink