vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Changing thread ID's to match those of deleted threads (https://vborg.vbsupport.ru/showthread.php?t=314970)

Firyou 10-19-2014 03:10 PM

Changing thread ID's to match those of deleted threads
 
I recently had a mistake happen on my forum where a lot of important threads were deleted. I'm in the processing of restoring those threads and I was wondering how I could go about changing the thread ID of a newly started thread to match those of the ones that were deleted?

So for example, a thread ID for 26756 was deleted. I'm reposting a new thread with the contents from that deleted thread and it has the ID of 73612 and I want to change it back to 26756.

tyia

Lynne 10-19-2014 03:17 PM

I've never tried to do that before, but you would need to change the thread.threadid field as well as the post.threadid for all the posts in that thread. Possibly threadviews.threadid (if that matters to you).

I would strongly recommend doing this on a database backup first. And, make sure you do a database backup before doing it on your live site also.

cellarius 10-20-2014 05:24 AM

How many threads are we talking about?

I would go the other way round and change internal links to those threads in the database, and for external links establish redirects in .htaccess.

Firyou 10-22-2014 12:02 PM

Quote:

Originally Posted by cellarius (Post 2519479)
How many threads are we talking about?

I would go the other way round and change internal links to those threads in the database, and for external links establish redirects in .htaccess.

Maybe about 30 threads? I tried setting a redirect 301 through .htaccess and I just received a 500 internal server error.

cellarius 10-22-2014 12:10 PM

For 30 threads, I'd definitely do static redirects in .htaccess. If you're getting server errors, you're doing it wrong, i.e. the redirects are either wrong or conflict with other code present in your .htaccess.


All times are GMT. The time now is 12:19 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00915 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete