Skip to main content
Topic: OpenImporter (Read 59062 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: OpenImporter

Reply #30

Very quick and dirty guide:
download
unzip
take the content of the "importer" directory and upload it somewhere web-accessible
go to: http://www.yoursite.tld/dir/you/uploaded/importer.php
* follow the instructions
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #31

I installed elkarte under the smf folder. Inside elkarte I put the importer. I set the paths to smf and elk but importer remained at 0%. So I tried again but I had an error in import.php. I'll try later, I'm on tablet now.
sorry for my bad english

Re: OpenImporter

Reply #32

Drop here any error you see. ;D

I'll test it again tomorrow.
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #33

I tried again on a fresh copy of my smf forum. The importer just remains to step 1. I attach a screenshot

after restarting the importer I get this
You must select at least one step to import.
imp.error_line 297
imp.error_file C:\wamp\www\s***2014\s***elk\OpenImporter\Importer.php

so no way to restart the importer. (only in incognito mode with chrome)
Last Edit: October 30, 2014, 07:38:43 pm by radu81
sorry for my bad english

Re: OpenImporter

Reply #34

hmm... looks almost like I forgot to add a file... :-\
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #35

I did some more work and tests.
The attached version works for me on my old SMF 1.1 db upgraded to 2.0 and then converted with OI.

At a quick glance boards, topics, posts and PMs look fine.
I don't have attachments, so I don't know about that step...
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #36

I tried the importer in attachment but I get this after setting the paths and click continue

Trying to get property of non-object
C:\wamp\www\skodaelk\OpenImporter\Importer.php
469
sorry for my bad english

Re: OpenImporter

Reply #37

O_O

Okay, this error is completely unexpected...

Line 469 is a loop through the steps of the importer, though at that point, unless of meteorites the xml should be loaded...
I'll try on the windows machine, give me half an hour.
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #38

At least now I know what going on, the importer strips the directory separator between the source (directory) and the destination (file) on windows, so elkarte1.0/smf2-0_importer.xml becomes elkarte1.0smf2-0_importer.xml and it fails loading the importer.
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #39

Could you try what fixed the issue for me?
In importer/OpenImporter/Template.php:
Code: (find) [Select]
var url = "import.php?action=validate&xml=true&" + string + "=" + target.value.replace(/\/+$/g, "") + "&import_script=', $this->response->script , '";
Code: (replace with) [Select]
var url = "import.php?action=validate&xml=true&" + string + "=" + target.value.replace(/\/+$/g, "") + "&import_script=', addslashes($this->response->script) , '";
it's more a workaround than a proper fix, but for now it should work.
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #40

Thank you very much Emanuele, that worked!

I just made my first complete import. The attachments were all imported (I use multiple attachments in SMF). I just had to run the fix from Admin -> Maintenance -> Attachments , and the paths were corrected

p.s. there is only a small error when I restart the importer (if the first importer was not finished) I get this:
You must select at least one step to import.
imp.error_line 297
imp.error_file C:\wamp\www\skodaelk\OpenImporter\Importer.php
To solve that I have to go on another browser or use Incognito mode
sorry for my bad english

Re: OpenImporter

Reply #41

Quote from: radu81 – Thank you very much Emanuele, that worked!
Great!

Quote from: radu81 – I just made my first complete import. The attachments were all imported (I use multiple attachments in SMF). I just had to run the fix from Admin -> Maintenance -> Attachments , and the paths were corrected
That shouldn't happen, though it's not "terrible".

Quote from: radu81 – p.s. there is only a small error when I restart the importer (if the first importer was not finished) I get this:
You must select at least one step to import.
imp.error_line 297
imp.error_file C:\wamp\www\skodaelk\OpenImporter\Importer.php
To solve that I have to go on another browser or use Incognito mode
Yeah, I have to unset the session when the import is finished.
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #42

I have custom fields in user profile and I noticed that there were not imported. The open importer does not handle custom fields?

I also noticed that avatars were not imported (for this I will do a new import on a fresh install, in smf I have a mod for choosing avatar when registering)
sorry for my bad english

Re: OpenImporter

Reply #43

I didn't check deeply the smf-to-elk converter, but I guess it doesn't move (yet) the custom fields.

What configuration do you use for the avatars?
As attachment? Or did you specify a custom directory?
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #44

Yes, custom fields are easy:
Code: [Select]
	<step>
<title>Importing custom fields</title>
<detect>{$from_prefix}custom_fields</detect>
<destination>{$to_prefix}custom_fields</destination>
<presql>TRUNCATE {$to_prefix}custom_fields;</presql>
<query>
SELECT
id_field, col_name, field_name, field_desc, field_type, field_length,
field_options, mask, show_reg, show_display, show_profile, private,
active, bbc, can_search, default_value, enclose, placement
FROM {$from_prefix}custom_fields;
</query>
</step>
<step>
<title>Importing custom fields data</title>
<detect>{$from_prefix}custom_fields</detect>
<destination>{$to_prefix}custom_fields_data</destination>
<presql>TRUNCATE {$to_prefix}custom_fields_data;</presql>
<query>
SELECT
id_member, variable, value
FROM {$from_prefix}themes
WHERE variable LIKE 'cust\_%';
</query>
</step>
added to /Importers/elkarte1.0/smf2-0_importer.xml following the XML structure. ;)

Less easy may be the instant message fields (ICQ, AIM, MSN, ???), but... honestly... is there anyone still using any of them? O:-)
Bugs creator.
Features destroyer.
Template killer.