Advertisement:

Author Topic: Moved forum now "new topic" etc. still has old forum's link  (Read 6596 times)

Offline 420Connect.co.uk

  • Full Member
  • ***
  • Posts: 413
    • 420connect.info on Facebook
    • @4twentyconnect on Twitter
    • 420 Connect
Moved forum now "new topic" etc. still has old forum's link
« on: September 11, 2014, 01:19:05 PM »
Hello,

Thanks for taking the time to help out!

Basically I've managed to backup and restore my forum - or so I thought..
Somewhere along the way I must have missed something as now when on my new domain & forum, when you click post new topic etc. if redirects to my old forum.

I've tried re-running repair_settings.php to check my paths but they all seem okay?

Much appreciated if there's an easy fix someone can point me to / detail


Thanks
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

Offline 420Connect.co.uk

  • Full Member
  • ***
  • Posts: 413
    • 420connect.info on Facebook
    • @4twentyconnect on Twitter
    • 420 Connect
Re: Moved forum now "new topic" etc. still has old forum's link
« Reply #1 on: September 11, 2014, 02:06:55 PM »
Solved this myself.

For future reference;

I found where the old forum url was still integrated into the forum by searching via phpmyadmin
I then could see where the url's still hadn't been updated yet - mainly in Pretty URL's mod.
change them over (uninstall, then reinstall pretty url's) and thats us :)
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,241
  • Gender: Male
    • Kindred-999 on GitHub
Re: Moved forum now "new topic" etc. still has old forum's link
« Reply #2 on: September 11, 2014, 02:44:01 PM »
yes...

repair_settings only fixes the standard feature and settings.

It will not "fix" prettyurls at all.
it will not "fix" any links in posts or in mods...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline 420Connect.co.uk

  • Full Member
  • ***
  • Posts: 413
    • 420connect.info on Facebook
    • @4twentyconnect on Twitter
    • 420 Connect
Re: Moved forum now "new topic" etc. still has old forum's link
« Reply #3 on: September 11, 2014, 03:17:34 PM »
I'm now attempting to change my forum's location from

/public_html/forum
to just /public_html/

am I right to just copy over the forum folders files directly to public_html then re-run repair_setting.php ?

many thanks.
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Moved forum now "new topic" etc. still has old forum's link
« Reply #4 on: September 11, 2014, 03:18:35 PM »
Yes, that's it ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

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

Offline 420Connect.co.uk

  • Full Member
  • ***
  • Posts: 413
    • 420connect.info on Facebook
    • @4twentyconnect on Twitter
    • 420 Connect
Re: Moved forum now "new topic" etc. still has old forum's link
« Reply #5 on: September 11, 2014, 03:23:46 PM »
Awesome Possum!  ;D

(no doubt I'll be back soon for something similar!) :P
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

Offline Night09

  • SMF Hero
  • ******
  • Posts: 1,940
  • Gender: Male
Re: Moved forum now "new topic" etc. still has old forum's link
« Reply #6 on: September 11, 2014, 04:13:33 PM »
There is a way ive used before to Query the database to find all instances of abc and convert them to xyz.

You basically should be able to have the messages table update all old urls for the new ones to make posts with old forum links relevant to the new one.

Something like this:

Code: [Select]
Update smf_messages SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');
There may be a couple of places (tables) this needs running on depending whats wrong and what you have installed.

Offline 420Connect.co.uk

  • Full Member
  • ***
  • Posts: 413
    • 420connect.info on Facebook
    • @4twentyconnect on Twitter
    • 420 Connect
Re: Moved forum now "new topic" etc. still has old forum's link
« Reply #7 on: September 12, 2014, 12:28:40 PM »
There is a way ive used before to Query the database to find all instances of abc and convert them to xyz.

You basically should be able to have the messages table update all old urls for the new ones to make posts with old forum links relevant to the new one.

Something like this:

Code: [Select]
Update smf_messages SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');
There may be a couple of places (tables) this needs running on depending whats wrong and what you have installed.

If anyone could elaborate on how to do this, that'd be great as after moving from /forum/ to public_html
I now have a further 2000+ instances needing changed :(

Thanks again!
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

Offline Night09

  • SMF Hero
  • ******
  • Posts: 1,940
  • Gender: Male
Re: Moved forum now "new topic" etc. still has old forum's link
« Reply #8 on: September 12, 2014, 01:25:17 PM »
Run the query in phpmyadmin in the query box. Make sure you have backed up before making any changes.

Replace old domain and new domain with those relevant to you.

Once its run the Query it should change all instances found if successful.