Hey there again,
I'm trying to move my SMF from the public_html to a folder inside the public_html, but the layout looks bugged and everytime I click on something, it redirects me to a page (error) as it would be in the public_html.
For example, a link redirects me to:
website.com/index.php
while it should be:
website.com/community/index.php
I have tried running a repair_settings.php in the same folder as Settings.php but that didn't work out for me. There is also a link on top which says: ''The default theme's directory is wrong, please correct it by clicking this text.'' but clicking that, doesn't fix my problem.
From what I could've seen, I can say that the database paths are all correct.
Any thoughts?
what does it actually suggest as the path? Maybe, that's not correct.
Obviously it should have your new subfolder in it.
Are you sure you moved all the files?
Yes, I'm sure that I've moved all possible folders and files to the new folder. At the moment, the links are acting as the files and folders would be in the public_html (website.com/**filehere**) instead of ''community'' in between (website.com/community/**filehere**)
then put the community in there and that should fix it.
That's something repair_settings should fix.
You said it didn't work out, what exactly happened?
Quote from: Justyne on July 23, 2014, 05:55:10 PM
then put the community in there and that should fix it.
Yeah well, your comment is not helping me at all.
Quote from: margarett on July 23, 2014, 05:56:19 PM
That's something repair_settings should fix.
You said it didn't work out, what exactly happened?
I downloaded the repair_settings from this page (http://wiki.simplemachines.org/smf/Repair_settings.php), directly from the download section without changing any values. I uploaded (and removed afterwards) it to the /community sub-directory, but it still looks bugged.
It won't magically fix anything just by putting it there. You have to use it to change the values, to include community.
you might have to change the values. Check the paths displayed in repair settings and if they actually point to the correct places.
If your path is public_html/community you should see this in the paths of repair settings. If its not there put it there and save.
Quote from: ‽ on July 23, 2014, 06:17:46 PM
It won't magically fix anything just by putting it there. You have to use it to change the values, to include community.
^^ This ;)
The wiki should help you understand better what to do with it.
What is repair_settings.php? (http://wiki.simplemachines.org/smf/Repair_settings.php)
Oh wow, I forgot to actually head over to the file (/community/repair_settings.php) and set the paths manually. I thought it would somehow fix everything automatically, but after reading that topic and your comments again, I got it figured now.
Thanks alot for the quick responses guys! ;)
Glad we could help. Anytime.
Nice ;) Don't forget to immediately remove the file after using it!
yea and even if you forget the system will tell you next time the admin logs in...
extremely useful tool...
Eh, so after I moved the forum to the /community sub-directory, you will get alot of dead links in topics aswell. Any ideas on how to fix that?
All your internal links should be fine, if there are broken external links, then I would guess that they were messed up -before- the move as well.
would you post a link to your site and let's have a looksee?
Quote from: Bob Perry on July 24, 2014, 05:00:34 AM
All your internal links should be fine, if there are broken external links, then I would guess that they were messed up -before- the move as well.
would you post a link to your site and let's have a looksee?
Here's an example of what I mean:
http://www.avttdm.com/community/index.php/topic,5770.msg41521.html#msg41521
Old topics which are still reffering to the old links, didn't get updated automatically. External links are fine as those didn't change.
Note: If you look around the forum, you might notice that some links are correct. I updated them by hand.
There's no automated way to do that, mostly because doing find/replace on a database is a heavily nasty operation to do - since it has to go through the entire database post by post and all the time it's doing that, it's not letting anyone else look at posts.
Quote from: ‽ on July 24, 2014, 05:25:36 AM
There's no automated way to do that, mostly because doing find/replace on a database is a heavily nasty operation to do - since it has to go through the entire database post by post and all the time it's doing that, it's not letting anyone else look at posts.
If we were going to do this, what query would I need to execute?
Yazar, I don't recall the table names off the top of my head but somewhat like this
UPDATE messages
SET posts = REPLACE(posts, 'string1', 'string2')
WHERE posts LIKE '%string1%'
Yup, that's the general format.
UPDATE smf_messages
SET body = REPLACE(body, 'yourdomainhere.com/index.php', 'yourdomainhere.com/community/index.php')
WHERE body LIKE '%yourdomainhere.com/index.php%';
And then wait.
Quote from: Justyne on July 24, 2014, 05:34:25 AM
Yazar, I don't recall the table names off the top of my head but somewhat like this
UPDATE messages
SET posts = REPLACE(posts, 'string1', 'string2')
WHERE posts LIKE '%string1%'
UPDATE avttdmc2_forummessages
SET body = REPLACE(body, 'avttdm.com/index.php', 'avttdm.com/community/index.php')
WHERE body LIKE '%avttdm.com/index.php%'
Is this correct?
Edit: Question mark answered me, meh. Lemme try this.
That's 'interrobang' ;)
But yes, that's the way to do it :)
O:)
Quote from: ‽ on July 24, 2014, 05:46:45 AM
That's 'interrobang' ;)
But yes, that's the way to do it :)
Ah sorry. I learned something new :P
Anyway I executed this query it did its job in 1-2 seconds. Didn't take that long. There were only 479 posts like that.
Though I also need to change them on the topics, because this query only changes replies.
might be a good idea to put your forum into maintenance mode first, should something go awry
QuoteThough I also need to change them on the topics, because this query only changes replies.
No. The smf_messages table contains every post in the forum, including the first post in topics.
Quote from: ‽ on July 24, 2014, 05:51:10 AM
QuoteThough I also need to change them on the topics, because this query only changes replies.
No. The smf_messages table contains every post in the forum, including the first post in topics.
Oh alright. Then
Yeah my forum is still on maintenance mode and I'm going to keep it on it for a few more minutes just incase the query didnt finish.
If it came back to you, it finished already.
Quote from: ‽ on July 24, 2014, 05:53:21 AM
If it came back to you, it finished already.
Yeah I got the response, its completed. Good job : D
Thanks to everyone for their help.
Trent mark this as solved pls.
Sub 500 posts shouldn't take a long time. It gets slower the more/longer posts you have, roughly proportional to the total amount of content it has to wade through.
Alright, everything seems to work fine now.
Thanks again for your time and quick responses ;)
Glad we could help.
also... form your urls, it looks like you have that silly "SEF" checkbox checked... I recommend unchecking that. it is pointless, serves no real purpose, and often confuses things later on. (it's left over from years ago when search engines had to have an .html marked page to understand how to catalog it)
You should see how much effort I had to go to in this current mod project to specifically work around that nonsense.
Nicely sorted, guys'n'gal!