XF 1.1 What happens to the threads inside a forum once it's deleted

faeronsayn

Well-known member
So I've recently deleted a lot of forums, and I am wondering what happened to the threads that were within these forums.

How would I go about removing the completely? I created a new forum and some how some random threads appeared from a previous forum that I deleted. Probably because they had matching IDs.

Anyway, how would I go about completely removing those threads that have their forums deleted?
 
That is a bug which has been fixed in 1.1.4.

You will need to delete those threads using queries.

On my phone so can't provide the queries now.

Thanks for the reply. I am wondering, if i'd need to do extra work when I upgrade to v1.1.4 since the forums were deleted in v1.1.3.

If you could provide some sort of queries, whenever you have time. That would be great :)
 
Oh, my mistake.
It's not fixed in 1.1.4, it will be fixed in a later release - 1.2.0.

The best advice is to leave them where they are for now and deal with them once the fix is in place.

http://xenforo.com/community/threads/deleting-a-forum-doesnt-delete-its-threads.9743/

Problem is v1.2 is likely to be pretty far away from release right now. I need to query all the thread IDs that exist. But I can't do that since the forums I deleted (thinking their threads would be deleted as well) still have their threads in the database.

Since these threads are essentially in "no node" would the node_id column in the xf_thread table be blank? If I delete entries in that table would that delete the threads and all the posts in that thread?

So maybe something like this as the query?

Code:
DELETE FROM xf_thread WHERE node_id = '';
 
Doing that won't update all the associated data.

You would be better off moving them back into a valid forum using SQL and then deleting them using the inline mod tools.
 
Doing that won't update all the associated data.

You would be better off moving them back into a valid forum using SQL and then deleting them using the inline mod tools.

I don't think that would be efficient. There would be about 30-40thousand threads i'd be manually deleting.
 
Doing as you have suggested will cause all sorts of problems due to joined records.

If you still want to do it you will need to formulate all of the relevant queries involved when a thread is deleted.
 
Doing as you have suggested will cause all sorts of problems due to joined records.

If you still want to do it you will need to formulate all of the relevant queries involved when a thread is deleted.

Where would I be able to find all the queries that are used when a thread is deleted?
 
Problem is v1.2 is likely to be pretty far away from release right now. I need to query all the thread IDs that exist. But I can't do that since the forums I deleted (thinking their threads would be deleted as well) still have their threads in the database.

Since these threads are essentially in "no node" would the node_id column in the xf_thread table be blank? If I delete entries in that table would that delete the threads and all the posts in that thread?

So maybe something like this as the query?

Code:
DELETE FROM xf_thread WHERE node_id = '';
The node_id will still exist in the db, so if you make a new node with the node ID of the one you just deleted; threads will reappear.
 
oh man, I thought this was fixed in 1.1.4 :(

So I have a question, I just deleted about 50,000 threads and post and I was getting ready to import another database into it. Will that mess up the import since these threads are still in the database?

I don't really care of the thread id's at this point.

Thanks
 
oh man, I thought this was fixed in 1.1.4 :(

So I have a question, I just deleted about 50,000 threads and post and I was getting ready to import another database into it. Will that mess up the import since these threads are still in the database?

I don't really care of the thread id's at this point.

Thanks

Always avoid running the same import multiple times on the same database. But if you insist on doing bad then see this post for queries:

http://xenforo.com/community/threads/import-question-second-import-over-old-one.16663/#post-311819
 
Thanks Jake, it's actually not the same import.

Here is the short story.
I made a clone of my site and set it up on another url (I have 2 licenses)
Then I removed all threads from the clone site that I didn't want on the new URL, I'm basically splitting my site up, I'll remove the opposite threads on the old URL.
Then I have a vb database that I'm going to import on the new URL, which hasn't been imported anywhere else.
I just want to know if I'll run into problem with the import on the new URL, also will I run into issues on the old url when those threads and forums are removed from it.

It sounds confusing as I write this, but I know what I want to do and I think it shouldn't be a problem.
I would just like to have all deleted threads/forums removed from the database on both installs to help trim up the database.
 
Back
Top Bottom