How to import my set up when upgrading to 2.09 from 1.19

Started by Topman, April 17, 2015, 08:13:49 AM

Previous topic - Next topic

Topman

I have just bitten the bullet and re created a forum using the total install of 2.09.
I have put in in a sub domain this time.
It all works fine although as yet I have not imported my existing database content to the new database yet.

What I want to knwo is how do I transfer the style of the old forum in 2.09?
I tried just swapping the index,.php file and that stopped it working.
If you have a look at the old current forum http://www.brand-newhomes.co.uk/forum/smf/index.php  you can see how it varies from  the  "standard default theme"
I did this years ago and it would take me a long time to find all the code I changed.

I also want to set up a re direct to the new sub domain http://forum.brand-newhomes.co.uk  and tried this:
RewriteEngine on
Redirect permanent /forum/smf but the home page is not re directing.

I tried:
RewriteEngine on
RewriteRule ^/forum/smf/index.php http://forum.brand-newhomes.co.uk/

but this worked:
RewriteEngine on
RewriteRule ^/buying_brand_new_home_initial_considerations.htm http://forum.brand-newhomes.co.uk/

So presumably the first part ^/forum/smf/index.php or /forum/smf  is wrong.

What I cannot do is do a separate redirect for each and every post - all 1500 of them!
Does anyone have any ideas how to do this?

Kindred

why did you do that?

when going form one version to another, you should not be setting up a new installation and then attempting to import anything. You SHOULD be using the upgrade script directly on your existing forum/database

http://wiki.simplemachines.org/smf/Upgrading

If you do it that way, there is no need to mess around with silly redirects either.

However, regarding your theme... nope.  1.1.x themes will NOT work on 2.0.x
You would have to pick or design a new theme based from the 2.0.x Curve templates.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Topman

But I want my forum in a sub domain!
Will an upgrade mean this is unnecessary?

To be honest, I am afraid to let the upgrade or 2.09 anywhere near my current and working database.
I would rather use a new installation and a copy of the old database before getting rid of the old one.

Antes

Then you have to clone your current running forum into a sub domain. Which means you have to export DB and import into new one, copy files to new location, change paths (or fix) and settings to show new DB.

Kindred

or -- better choice, IMO...

upgrade in place with the current 1.1.x to 2.0.x and then MOVE the forum files and run repair_settings.php to move it into the subdomain
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Antes

Quote from: Kindred on April 17, 2015, 10:54:12 AM
or -- better choice, IMO...

upgrade in place with the current 1.1.x to 2.0.x and then MOVE the forum files and run repair_settings.php to move it into the subdomain

That's a fair solution as well only if user doesn't want to do a test upgrade before doing it for real :)

Illori


Topman

Quote from: Antes on April 17, 2015, 10:47:48 AM
Then you have to clone your current running forum into a sub domain. Which means you have to export DB and import into new one, copy files to new location, change paths (or fix) and settings to show new DB.

The old database will be the one I use, as I will import the old database to the new empty one.
If the existing files are moved to the sub domain URL will this do the re direct?

Kindred

no...   moving files will NOT redirect...  and doing it the way you suggest is going to cause you headaches, IMO.

if you just have a redirect, then http://stackoverflow.com/questions/15712358/redirect-directory-to-a-subdomain
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Topman

I have tested this:

RewriteEngine on
Redirect permanent /forum/smf/ http://forum.brand-newhomes.co.uk/


and it works for the home page.
At the moment any other page gets an "error 404 not found" which it would as the database isn't on the new forum URL yet.

Will this simple re direct work for ALL posts, threads, catagories of the existing forum (once the database is set up) with the need to re direct every one?

Night09

I can see your forum fine and read the welcome post but I do notice there is a template issue bunching everything up on the left. This shouldnt happen on a fresh install.

Topman

I see what you mean. 
That is why I wont let 2.09 anywhere near my 1.19 working database until 2.09 works properly.

Night09

Make a copy of your database and files first then you can do a test run as suggested. As long as you have a full backup to fall back on dont be afraid of attempting to upgrade.

2.0.9 will put a complete new set of template files in the folder so any previous 1.0.x errors should be gone anyway. You should be left with a clean 2.0.9 full of posts but no mods if it goes right.

Upgrading is nothing to do with redirecting also mentioned in this thread for reference.

Kindred

I still maintain that you are going about this entirely the wrong way....






regarding the redirect...
You apparently didn't pay attention to the stackoverflow article

RewriteRule ^(forum/smf/.*)$ http://forum.brand-newhomes.co.uk/$1 [R=301,L,NC]
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Topman

I used this:

QuoteRewriteEngine on
Redirect permanent /forum/smf/ http://forum.brand-newhomes.co.uk/

and it did re direct the home page OK
I hope it works with the other pages once the database is imported.

I may be "going about this the wrong way" but this forum is littered with users who have upgraded and found problems or had their database messed up. 

Kindred

not if they did it as instructed...


and I keep telling you... that htaccess is WRONG - Use the one that I posted...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Topman


Kindred

are you being purposefully dense?

YOU are attempting to use:

Redirect permanent /forum/smf/ http://forum.brand-newhomes.co.uk/


both I *AND* that article have told you to use

RewriteRule ^(forum/smf/.*)$ http://forum.brand-newhomes.co.uk/$1 [R=301,L,NC]
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Topman

No I am not being purposely dense!
I have used both re directs your one and the one I was given.
BOTH only re direct the home page of the forum to the new URL.

All the posts are still on the old URL and are not redirected.
In fact they return an error 404!
This for example: http://forum.brand-newhomes.co.uk/house-builders/
Click on the URL in the browser and this comes up
http://forum.brand-newhomes.co.uk/house-builders/?pretty;board=house-builders.0

And this is with 1.19.  I haven't even started with the upgrade to 2.0.10

Antes

First of all, your forum. subdomain fully using your main forum's information, which is why its broken.

RewriteEngine On
Redirect 301 / http://forum.brand-newhomes.co.uk


Should be well enough to do all redirects (Warning, this code also won't work, if you don't clone your forum into sub-domain with proper information).

Kindred

Antes...   that redirect won't pass the arguments 9which is why I suggested the one above)



and topman...   I see your problem now...   you have installed the prettyurls mod and have not yet reconfigured the htaccess for the moved site...  (and probably other things that you missed, as Antes pointed out)

When you move a forum, you need to change ALL references to point to the new location...  this includes URLs (and paths) in the core and in mods
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Antes

He's redirecting whole site, that rule I wrote should be written in /forum/smf/.htaccess not the root one, otherwise that'll create complete mess. (and yea yours needs to go root/.htaccess).

Topman

OK,
I have changed the URL in the settings.php to the new sub domain and now when you hover over each on the home page it gives the correct  subdomain URL.  Click on any of them and you still get the Error 404 Page not found.

Just how do I "clone your forum into sub-domain with proper information"  A bit of help and/or explanation would be appreciated.

Antes

Run repair_settings.php, it'll show you what need fixing. You need to copy/clone your database and create new one, unless you are moving right now. Then you just need to run repair_settings.php and it'll fix the path issues inside DB/Settings.php

Topman

I have both URLs using the same database I will try it with a new (copy) version of the database.
I am also having issues with the re directs too.

Illori

using the same database?????????????????? with the tables having the same prefix for both? that will work out badly.... you really need seperate databases for both, as there are paths stored in the database that will mess things up for you real quick.

Topman

OK I have deleted the settings.php in the new subdomain URL until I can get my database transferred to a new database location.

Illori

why did you delete Settings.php? it would have been much easier to put it in maintenance mode until you can fix it.

Topman

It stops the other forum working duplicate content etc.
It is easy enough to pull it back in again with ftp.
I've been doing it all day!

Night09

You are making what would have been a reasonably easy task into a disaster...You are ignoring advice from people who can do this in their sleep..


Topman

"Reasonably easy task"  ;D

I wanted to do two things whilst at the same time ensure my one and only database is protected and safe.

1) Move the forum to a subdomain and have all the post urls re directed
2) Update the forum to 2.0.10 so I can make better use of packages and be more mobile compatible.

I have not ignored advice, I tried one thing, it didn't work as I expected and now I am trying another method as suggested.

Perhaps when I have a copy of my database on a new database MySQL the subdomain re directs will work.
(or should I just uninstall all packages anyway as they wont work when I upgrade to 2.0.10)

Night09

As far as the upgrading goes the less packages installed the less can go wrong but saying that always check first for errors. Upgrading from 1.0.x to 2.0.10 will mean all packages are gone so it will end up a fresh install no packages.

For the redirect when you move the files they all still point to the old location so repair_settings.php needs to be run to fix that so the filepaths are correctly pointing to the new subfolder and not the old root folder.

You should not try to connect two SMF forums in different folders to the same database as it will cause problems.

Make a backup of the database and files before doing anything else.

You can test easily then without fear of loosing it all if it doesnt go as planned. The SMF_ prefix and connection password should remain the same and just filepaths change using repair_settings.php.

First I would deal with the upgrade and once happy then I would deal with the move and redirect.

Dont try to do it all together or it will get confusing and go wrong.

Topman

Thanks.  I was considering un installing all my packages before upgrading.  It looks like this would be a good idea.

Illori

you dont have to, the upgrade overrides all the files anyway so that forces them to be uninstalled.

Topman

OK,
I have got the 1.19 on the new subdomain http://forum.brand-newhomes.co.uk which is now operating from a new database which is an imported copy of the previous Forum URL which is still up and running using 1.19 but a different database.

But I still cannot access any page on the new Forum. version other than the home page even though the URLs are being correctly displayed.  I have used settings repair and have clicked on every Path and URL so they are all the recommended ones.

So why isnt it working? Surely I need this to work before upgrading process and finally the redirect from my existing forum URL  domainname/forum.smf/


Topman

I said I have used settings repair.
Is this download different?

Kindred

when you move a forum, you have to run repair_settings TWICE (or save and recheck)
the first time sets the database
the second time allows you to set the URLs and paths.

http://wiki.simplemachines.org/smf/Repair_settings.php#Important_Note

read the "important note" section at the bottom of the faq page.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Night09

Im noticing something about your subdomain.  First its set up as http://forum.brand-newhomes.co.uk  but the original forum is domainname/forum.smf/ .

The latter isnt an issue but the new subdomain may be a problem if there is no A record present for the URL. I dont know your hosts setup or who controls your IP but if there isnt a record it wont work.

I would put a basic test page in the folder and check by trying to browse to it.  Just open notepad and type testpage then save as testpage.html  then dump it in and see if it works. If that doesnt work the forum isnt going to until you make the A record.

Topman

Not sure what you are on about "A record"  but I did what you say and it comes up in the browser OK.
http://forum.brand-newhomes.co.uk/testpage.html
As does the home page http://forum.brand-newhomes.co.uk
But click on any of the links and they return a 404.

Topman

Quote from: Kindred on May 08, 2015, 08:07:29 AM
when you move a forum, you have to run repair_settings TWICE (or save and recheck)
the first time sets the database
the second time allows you to set the URLs and paths.

http://wiki.simplemachines.org/smf/Repair_settings.php#Important_Note

read the "important note" section at the bottom of the faq page.

OK I've deleted the settings file, imported a virgin one and used the repair_settings.php  in the link you provided.
first time I just did the database settings
Second time I amended the paths and URLs.
But:
1) No recommended setting for "Attachment Directory" so it was left blank!
2) I got this message: (although as it is still 1.1.19 version these don't apply I think.)
Notice: Undefined offset: 1 in /homepages/21/d424618090/htdocs/forum.brand-newhomes.co.uk/repair_settings.php on line 623
for="cachedir">Cache Directory:
Notice: Undefined offset: 1 in /homepages/21/d424618090/htdocs/forum.brand-newhomes.co.uk/repair_settings.php on line 625

and

Value not found!Notice: Undefined offset: 1 in /homepages/21/d424618090/htdocs/forum.brand-newhomes.co.uk/repair_settings.php on line 630
Notice: Undefined offset: 1 in /homepages/21/d424618090/htdocs/forum.brand-newhomes.co.uk/repair_settings.php on line 630
Notice: Undefined offset: 1 in /homepages/21/d424618090/htdocs/forum.brand-newhomes.co.uk/repair_settings.php on line 636
Notice: Undefined offset: 1 in /homepages/21/d424618090/htdocs/forum.brand-newhomes.co.uk/repair_settings.php on line 648

I dont know what to do now.

Kindred

Quote from: Kindred on May 05, 2015, 08:27:32 AM

and topman...   I see your problem now...   you have installed the prettyurls mod and have not yet reconfigured the htaccess for the moved site...  (and probably other things that you missed, as Antes pointed out)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Topman

I am beginning to think that I would be better off uninstalling Pretty URLs from the working forum and transferring at the files from that to the new subdomain forum. 
But the transferred database was copied from the working forum with Pretty URLs installed so that probably wont work either!

I have found that I didnt transfer the .htaccess file from the working forum to the new subdomain version.
I have now:

and changed:
RewriteEngine on
RewriteBase /forum/smf/

to

RewriteEngine on
RewriteBase /

It still dont work!

What else is there?
Where are the files I may need to change located?
I would appreciate a little more help please.

Kindred

this is one of the major issues with things like prettyurls.

try uninstalling it from the new site.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Topman

The only page I can get on the new site is the index.php home page.
I cannot log on as admin I get page not found error 404.

So I just tried to upgrade to 2.0.10 by dragging the upgrade files into the new forum webspace.
It messed up the other original forum, even though they are pointing to different databases with different  numbers with different passwords.  I used repair settings tool and managed to get the original one back.

In the new one I attempted to upgrade I just get this message:
"Unknown column 'add_deny' in 'field list' "

Topman

The only page I can get on the new site is the index.php home page.
I cannot log on as admin I get page not found error 404.

So I just tried to upgrade to 2.0.10 by dragging the upgrade files into the new forum webspace.
It messed up the other original forum, even though they are pointing to different databases with different  numbers with different passwords.  I used repair settings tool and managed to get the original one back.

It would appear my host re uploaded my database so the settings were not  configured for the 2.0.10 upgrade in the new site.

Now I am re uploading my existing forum files to the new subdomain URL with Pretty URLS uninstalled.
I will then re do the repair settings for 1) the new database (save) and then for URL paths etc, (save)

Ok it appears to be working without Pretty URLS installed but none of the attached photos can be seen.

Kindred

Which suggests that either the files were not copied, or the path was not adjusted for the attachments
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Topman

QuoteOk it appears to be working without Pretty URLS installed but none of the attached photos can be seen.
I found this http://www.simplemachines.org/community/index.php?topic=374178.0  and now they are there!
Fileziller ftp did it!

Topman

Quote from: Kindred on April 20, 2015, 06:42:11 AM
I still maintain that you are going about this entirely the wrong way....

regarding the redirect...
You apparently didn't pay attention to the stackoverflow article

RewriteRule ^(forum/smf/.*)$ http://forum.brand-newhomes.co.uk/$1 [R=301,L,NC]


If I add your code (as above) in the root .htaccess file above it doesnt re direct at all!  Why I dont know.
If I add this code
Redirect permanent /forum/smf/ http://forum.brand-newhomes.co.uk/
it does redirect but as:
http://forum.brand-newhomes.co.uk/buy-to-let/'accidental'-landlords-beware/msg1151/?pretty;board=buy-to-let;topic='accidental'-landlords-beware.msg1151&boardseen
not as it should be:
http://forum.brand-newhomes.co.uk/buy-to-let/'accidental'-landlords-beware/msg1151/

Kindred

Yes, because your redirect just says "redirect everything from This domain to that domain."

Mine says, copy the arguments, redirect to the new domain and then apply the arguments.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Topman

What is the difference?
and why wouldnt your re direct  work at all?
Not after scoring points here, I just want my forum to redirect with whatever method works best.
I have no idea how to "apply the arguments" anyway!

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Topman

Great help.  Next time I have a week to read and try and understand it all I'll give it another look.
Its a bit like wanting to know about Lions claws and being given a link to an encylopeadia.

How is it working for you?
Try this:
http://www.brand-newhomes.co.uk/forum/smf/landscaping-and-gardening/watering-a-lawn/

But how can I get rid of the extra bit (you have to click on the browser to see it)
http://forum.brand-newhomes.co.uk/landscaping-and-gardening/watering-a-lawn/?pretty;board=landscaping-and-gardening;topic=watering-a-lawn.0

Steve

Snide remarks aren't going to endear you to anyone who may want to help. ;)
DO NOT pm me for support!

Illori

IMO at this point as you are using prettyurls, you need to post in the mods support topic for further help.

Topman

Quote from: Steve on May 11, 2015, 08:02:57 AM
Snide remarks aren't going to endear you to anyone who may want to help. ;)
To be fair these links were not much help if any.

However, I would like to thank everyone who has replied over the last few weeks with help and advice and it has been a steep learning curve for me. 
Hopefully, others with similar problems will find this thread and be able to benefit from all the content.

My next task is the upgrade process to 2.0.10  and should I have any problem with that I will start a new thread.

Advertisement: