Advertisement:
A2Hosting

Author Topic: [SMF Converter] Drupal 6.2  (Read 56557 times)

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: [SMF Converter] Drupal 6.2
« Reply #40 on: June 18, 2010, 10:04:33 AM »
My Drupal installation has no attached files and no avatars. It was a blank and brand new 6.2 installation that has been filled with posts imported from my WordPress blog. All the converted posts display fine on the Drupal blog.
« Last Edit: June 18, 2010, 11:22:09 AM by sharks »
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,314
  • Blue Wolf
Re: [SMF Converter] Drupal 6.2
« Reply #41 on: June 18, 2010, 10:08:40 AM »
Perhaps you can try: (in the sql file)
Code: (find) [Select]
/******************************************************************************/
--- Converting attachments...
/******************************************************************************/

---* {$to_prefix}attachments
---{
$no_add = true;

$file_hash = getAttachmentFilename(basename($row['filename']), $id_attach, null, true);
$physical_filename = $id_attach . '_' . $file_hash;

if (strlen($physical_filename) > 255)
return;

$oldfile = $_POST['path_from'] . '/' . $row['filepath'];
if (file_exists($oldfile) && copy($_POST['path_from'] . '/'.$row['filepath'], $attachmentUploadDir . '/' . $physical_filename))
{
@touch($attachmentUploadDir . '/' . $physical_filename, filemtime($row['filename']));
$rows[] = array(
'id_attach' => $id_attach,
'size' => filesize($attachmentUploadDir . '/' . $physical_filename),
'filename' => basename($row['filename']),
'file_hash' => $file_hash,
'id_msg' => $row['id_msg'],
'downloads' => 0,
);

$id_attach++;
}
---}

SELECT u.nid AS id_msg, f.filename, f.filepath
FROM {$from_prefix}upload AS u
LEFT JOIN {$from_prefix}files AS f ON (u.fid = f.fid);
---*
and remove it, at least for the time being.
To-do lists are for deferral. The more things you write down the later they're done… until you have 100s of lists of things you don't do.
File a security report | Developers' Blog | Bug Tracker

Also known as Norv on D* | Norv N. on G+ | Norv on Github

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: [SMF Converter] Drupal 6.2
« Reply #42 on: June 18, 2010, 10:13:58 AM »
I did exactly what you said and this is what i get:


Converting...
Converting members... Successful.
Converting categories...
Warning: Invalid argument supplied for foreach() in /home/sharks/site/forum/convert.php(941) : eval()'d code on line 11
Successful.
Converting boards...
Warning: Invalid argument supplied for foreach() in /home/sharks/site/forum/convert.php(941) : eval()'d code on line 11
Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting posts - Part 2(this may take some time)... Successful.
Converting avatars... Successful.
Recalculating forum statistics... Successful.


Now, i go to my forum, and... there are 0 posts and 0 topics!

There are only 2 improvements:
- Now, the category is still here, and has not been deleted. In all previous attempts, i had to do forum maintenance fixing, to recover the boards, as there was no category at all after running the converter, which i assume deleted the category, without affecting the boards it contained.
- All members have been converted from Drupal.

P.S. I had the serious impression that the posts were not being parsed, as i have over 4000 posts on Drupal and it took maybe 1.5 seconds for the whole conversion.
« Last Edit: June 18, 2010, 10:19:20 AM by sharks »
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,314
  • Blue Wolf
Re: [SMF Converter] Drupal 6.2
« Reply #43 on: June 18, 2010, 10:18:26 AM »
Could you please run Admin > forum maintenance > Recount all forum statistics?
To-do lists are for deferral. The more things you write down the later they're done… until you have 100s of lists of things you don't do.
File a security report | Developers' Blog | Bug Tracker

Also known as Norv on D* | Norv N. on G+ | Norv on Github

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: [SMF Converter] Drupal 6.2
« Reply #44 on: June 18, 2010, 10:22:01 AM »
I just ran those 2 options:

Find and repair any errors.
Recount all forum totals and statistics.

Both were successful (no problems found), and still 0 posts and 0 topics.
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,314
  • Blue Wolf
Re: [SMF Converter] Drupal 6.2
« Reply #45 on: June 18, 2010, 10:32:46 AM »
Ah, I just read your edited post, obviously they weren't done...
It seems the problems are here: (sql file)
Code: [Select]
$request = convert_query("
SELECT value
FROM {$from_prefix}variable
WHERE name ='forum_containers'
LIMIT 1");
This does not result in a list of categories, as the converter expects.
Could you please run in phpmyadmin: (on drupal db)
Code: [Select]
SELECT * FROM drupal_variable WHERE name LIKE 'forum';
and post the result here, if any.

Or, you could perhaps export only the table drupal_variable, both structure and data, into another file? Please, check the resulting file to make sure no confidential data rows are included (feel free to delete them if there are). Just in case, perhaps you could PM the contents of the file, to be sure no confidential data slip into public?
To-do lists are for deferral. The more things you write down the later they're done… until you have 100s of lists of things you don't do.
File a security report | Developers' Blog | Bug Tracker

Also known as Norv on D* | Norv N. on G+ | Norv on Github

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: [SMF Converter] Drupal 6.2
« Reply #46 on: June 18, 2010, 10:52:10 AM »
I ran the query exactly as you posted above.
This is the result:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 30' at line 2

SELECT *
FROM drupal_variable
WHERE name LIKE 'forum';

LIMIT 0 , 30
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,314
  • Blue Wolf
Re: [SMF Converter] Drupal 6.2
« Reply #47 on: June 18, 2010, 12:50:27 PM »
No... it seems you had a "LIMIT 0, 30" text remaining there, in the SQL code textarea. :)
Please run only with the query above in the box.
To-do lists are for deferral. The more things you write down the later they're done… until you have 100s of lists of things you don't do.
File a security report | Developers' Blog | Bug Tracker

Also known as Norv on D* | Norv N. on G+ | Norv on Github

Offline Nao 尚

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,928
  • Gender: Male
    • wedgebook on Facebook
    • Wedge
Re: [SMF Converter] Drupal 6.2
« Reply #48 on: June 18, 2010, 01:03:16 PM »
I think phpMyAdmin automatically adds the LIMIT thing, and probably doesn't remove the final semi-colon before that.
The solution is of course to remove the semi-colon.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: [SMF Converter] Drupal 6.2
« Reply #49 on: June 18, 2010, 01:08:41 PM »
@Norv i only ran the query in the code box as you said. There was/is no other text in the query box.

I removed the semi-colon as Nao suggested, and here is the result (no error this time):

MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0004 sec )

SELECT *
FROM drupal_variable
WHERE name LIKE 'forum'
LIMIT 0 , 30
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

ThorstenE

  • Guest
Re: [SMF Converter] Drupal 6.2
« Reply #50 on: June 18, 2010, 01:17:41 PM »
The converter is currently for drupal "forum" posts only, not for the normal drupal content (articles). That's why there wasn't converted anything.

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: [SMF Converter] Drupal 6.2
« Reply #51 on: June 18, 2010, 01:28:26 PM »
So... Do i have to convert all my Drupal "story" type posts into "forum" type posts? Is there any easy way to do that? Right now i have over 4000 posts of the "story" type. In this situation, isn't it easier to modify a few lines in the converter to handle story types instead of forum types?
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,314
  • Blue Wolf
Re: [SMF Converter] Drupal 6.2
« Reply #52 on: June 18, 2010, 02:06:05 PM »
Perhaps it would be a good idea if you could try the second suggestion, making an export with the table drupal_variable, both structure and data. If you wish, you could PM it to me..., unless perhaps Nao could take a look at it.
(I will be offline for at least 14 hours soon.)
If you don't feel comfortable with doing so, that is okay, too, we can also look at a drupal installation, and see what is going on in that table. Not sure when, currently I don't have a local installation, nor database, at hand.
To-do lists are for deferral. The more things you write down the later they're done… until you have 100s of lists of things you don't do.
File a security report | Developers' Blog | Bug Tracker

Also known as Norv on D* | Norv N. on G+ | Norv on Github

Offline Oskar Calvo

  • Semi-Newbie
  • *
  • Posts: 33
Re: [SMF Converter] Drupal 6.2
« Reply #53 on: July 06, 2010, 04:34:15 AM »
Hello.

I'm trying to move a Drupal forum to smf, and I have a problem, it tell me that there is a problem with one of the drupal user id (drupal uid are key  and autoincrement), it toll me this:
Code: [Select]
Duplicate entry '11987' for key 'PRIMARY'I'm looking around it to understand why it toll me that, and I don't find what happens with the conversion to find a problem with this.

Thanks

Oskar

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: [SMF Converter] Drupal 6.2
« Reply #54 on: July 06, 2010, 11:50:23 AM »
LMAO. Unfortunately, Oskar, i have been waiting for someone to fix that Drupal coverter since ages!!

Wise advice: Give up now and save yourself the sorrow of knowing you're alone in this.
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

ThorstenE

  • Guest
Re: [SMF Converter] Drupal 6.2
« Reply #55 on: July 06, 2010, 01:58:51 PM »
Oskar, have you tried to re-start the conversion from the beginning? If you still got the same error edit drupal_to_smf.sql and find:
Code: [Select]
---* {$to_prefix}membersAdd after:
Code: [Select]
---{
$ignore = true;
---}
then restart the conversion.

sharks,
sorry to hear that but as I said before: I wrote the converter initially for a drupal forum conversion, not for an article conversion.

Since I'm no longer a member of the SMF team I have no intentions to rewrite my converters or create new ones.. Maybe someone from the current team members is able to help you.

Offline Nao 尚

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,928
  • Gender: Male
    • wedgebook on Facebook
    • Wedge
Re: [SMF Converter] Drupal 6.2
« Reply #56 on: July 06, 2010, 05:10:52 PM »
Since I'm no longer a member of the SMF team I have no intentions to rewrite my converters or create new ones.. Maybe someone from the current team members is able to help you.
I personally have no interest in converters. The only one I could possibly work on is a WordPress converter, and possibly a MovableType converter, but even then, I'd need to have a reason to import one of these blogs (i.e., someone wants to move their blog to noisen and I find it a good challenge to implement.)
sharks, I think I asked you something on a WP topic and you didn't reply. (From memory.)
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: [SMF Converter] Drupal 6.2
« Reply #57 on: July 06, 2010, 07:25:13 PM »
sharks, I think I asked you something on a WP topic and you didn't reply. (From memory.)

Eh? I don't think that was a question from your other post. :D But i'll reply to it.
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline Oskar Calvo

  • Semi-Newbie
  • *
  • Posts: 33
Re: [SMF Converter] Drupal 6.2
« Reply #58 on: July 07, 2010, 06:39:16 AM »
Hello Folks, As I'm a Drupal Developer, I'm building a module to move from Drupal to smf using the drupal apis, it's easy for my.

I hope to finish it, and have a 6.x version soon.

Oskar

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: [SMF Converter] Drupal 6.2
« Reply #59 on: July 07, 2010, 09:11:16 AM »
Hello Folks, As I'm a Drupal Developer, I'm building a module to move from Drupal to smf using the drupal apis, it's easy for my.

I hope to finish it, and have a 6.x version soon.

Oskar

Thanks a lot for your endeavor and commitment, Oskar.

We all look forward to seeing your new project. :)

BTW, could you build your module so that it's compatible with SMF 1.1 primarily. I mean, compatibility with SMF 2.0 would also be good, but SMF 1.1 is the stable version, so it is preferred.
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/