ElkArte Community

General => OpenImporter => Topic started by: Graph on October 31, 2015, 11:45:30 am

Title: OpenImporter with SMF 2.1 ?
Post by: Graph on October 31, 2015, 11:45:30 am
This being my first post here, just wanna say Hello to all, and congratulate you for the good work!

Just installed ElkArte and the portal. I also have a test forum installed with SMF 2.1 beta2 (no Portal) which works fine, and which is by now populated with membergroups, categories, boards, topics etc. Instead of going thru all that work with the freshly installed ElkArte, can I use OI instead to bring over the data?

Best.
Title: Re: OpenImporter with SMF 2.1 ?
Post by: emanuele on October 31, 2015, 05:02:54 pm
Hi Graph and welcome! :)

As far as I remember 2.0 and 2.1 structure for that part is mostly the same, so OI should work (you could even select the tables you want to import clicking "advanced" in the page that asks for the settings). Honestly I never tested it in such a way, so I can't guarantee you 100% success rate... :(
Title: Re: OpenImporter with SMF 2.1 ?
Post by: Wizard on October 31, 2015, 06:41:59 pm
Hello @Graph . Welcome to ElkArte. :)
Title: Re: OpenImporter with SMF 2.1 ?
Post by: live627 on October 31, 2015, 11:48:33 pm
I've also never tried it, but I assume it'll work given that the structure of things in SMF 2.1 is pretty much the same as in SMF 2.0.
Title: Re: OpenImporter with SMF 2.1 ?
Post by: Graph on November 01, 2015, 12:59:37 am
So I downloaded the .zip from GitHub, expanded it into a directory and then ftp'd it into the root of the ElkArte install on the server (FileZilla).

Then I ran the import.php and in the next screen I corrected the default paths. At first I entered the source db password, was rejected in the next step, then entered the destination db password (I feel this step could be presented more explicitly, but that might be just me  :) ), was accepted, looked at the long list of tables to be imported (not all applicable to my case, as my SMF 2.1 b2 is pretty much stock install, yet I changed nothing) - BUT after that:


Code: [Select]
Sorry, the database connection information used in the specified installation of your forum cannot access the installation of SMF 2.0. This may either mean that the installation doesn't exist, or that the MySQL account used does not have permissions to access it.

The error MySQL gave was: SELECT command denied to user 'elkartedbusernamename'@'someip' for table 'smf_members''
error_line 329
error_file /pathtoelkarteroot/importer/OpenImporter/Importer.php

Need to add that after somewhat hurriedly looking for a OI user guide and finding none, I decided to risk it without. This is how far I got. How do I proceed from here?

Edit: I have smf 21b2 and elkarte105 hosted basically as sub-folders in a common folder where all my stuff relating to testing is installed, and this is on a shared Linux account on GoDaddy. Also, when I set up the db for smf I chose not to allow direct access. Hope these details may be of help.
Title: Re: OpenImporter with SMF 2.1 ?
Post by: emanuele on November 01, 2015, 03:49:16 am
Try the one attached to the first post here: http://www.elkarte.net/community/index.php?topic=2118.0
Title: Re: OpenImporter with SMF 2.1 ?
Post by: Graph on November 01, 2015, 08:41:03 am
Did that, and now it hangs at a diff table (smf_settings), but basically for the same reason, the elkarte db is denied access to the smf db.
Title: Re: OpenImporter with SMF 2.1 ?
Post by: emanuele on November 02, 2015, 05:25:08 pm
I thought I fixed that, but apparently I didn't.
Can you just give the elkarte mysql user read access to the smf database?
Title: Re: OpenImporter with SMF 2.1 ?
Post by: Graph on November 03, 2015, 11:53:07 am
Unfortunately, I can't. My db's are hosted on GoDaddy and at time of setup I chose not to allow direct access to them. From what I read on the web (but haven't called support tech yet), it looks like this is something that can not be changed at any other time but during initial setup. I have reasons to believe this to be so, because I logged into phpMyAdmin on GD and there is no option to add user or set privileges to the existing user - there just isn't anything relating to users, period.

So this is the plan: I will create a new SMF db and this time will allow direct access. I bet OpenImporter will work as designed. If not, then I will create a user for it and grant reading privileges.

Please stand by...
Title: Re: OpenImporter with SMF 2.1 ?
Post by: radu81 on November 03, 2015, 02:24:22 pm
You can install WAMP or XAMPP, download a copy of your files and import the database. You can do all the needed tests into localhost ;)
Title: Re: OpenImporter with SMF 2.1 ?
Post by: Graph on November 04, 2015, 08:55:55 am
You're right, and that's an option I missed ;) Thanks for the wakeup call :)

I am actually using wamp to mirror my sites on localhost. But as I tried installing smf 2.1 beta2 I would get a fatal error at the last step and a few diff approaches I tried all ended up in this ditch. So my progress is slower than I expected. But it's a WIP.
Title: Re: OpenImporter with SMF 2.1 ?
Post by: emanuele on November 04, 2015, 02:59:57 pm
Ohh... I got it now.
Well, anyway I should try to fix again that code of mine... :-\
Title: Re: OpenImporter with SMF 2.1 ?
Post by: Jorin on November 05, 2015, 01:23:29 am
Quote from: emanuele – Try the one attached to the first post here: http://www.elkarte.net/community/index.php?topic=2118.0

Is that the actual ipmorter, latest version? I need one soon, I'm trying to migrate another board from SMF 2.0.11 to ElkArte. Btw, do you want to be informed of the progress?
Title: Re: OpenImporter with SMF 2.1 ?
Post by: emanuele on November 05, 2015, 02:16:41 am
I have to check again (it's a while I uploaded it) but I'm confident it is.
And, there is a known bug in that package: at some point of the importing process you may get an error and everything stops, but it's enough to reload the page and it starts again.
Yeah, feel fr Sure, let me know of any problem you encounter! And do some tests before converting the live instance! ;D
Title: Re: OpenImporter with SMF 2.1 ?
Post by: Jorin on November 05, 2015, 02:21:22 am
Hm, maybe update the home page? It leads to an then maybe old importer version.

Okay, I will inform you of problems and achievements. And yes, Dad, I will work with copies.  ;D
Title: Re: OpenImporter with SMF 2.1 ?
Post by: wintstar on November 05, 2015, 05:45:01 am
This is to SMF 2.1 * which is still in development. It is is not without reason pointed out, that such versions are not intended to be used in a live board. There are still many bugs and ongoing changes in this system, so that in my opinion can be no functioning Importer.

From SMF 2.0.11 of Importer works. At least in my Test Area.



Title: Re: OpenImporter with SMF 2.1 ?
Post by: Graph on November 05, 2015, 09:01:21 am
So, I mirrored everything on localhost,granted max privileges for ElkArte on SMF, ran the importer and failed on error "Unknown column 'message_labels' in 'field list' Line 151 in ...\OpenImporter\Database.php

The SELECT query that failed says SQLSTATE[42S22]: Column not found: 1054 Unknown column 'message_labels' in 'field list'.

the forums themselves continue to run properly.

Hope this info helps in trying to move forward.
Title: Re: OpenImporter with SMF 2.1 ?
Post by: emanuele on November 05, 2015, 12:33:35 pm
Quote from: Jorin – Hm, maybe update the home page? It leads to an then maybe old importer version.
It's still a development version, so it has problems, so better keep the other one that has problems, but of a different kind. xD
Title: Re: OpenImporter with SMF 2.1 ?
Post by: emanuele on November 05, 2015, 12:34:31 pm
Quote from: Graph – Hope this info helps in trying to move forward.
Yep, it's some of the differences in the database schema from 2.0 and 2.1 causing this error.
Something to fix indeed.