News:

Wondering if this will always be free?  See why free is better.

Main Menu

converter bbpress 2 to smf ?

Started by kas5986, September 26, 2013, 11:42:14 AM

Previous topic - Next topic

margarett

Actually those are your forum posts. So they do matter :P

Try this (again, backup):
UPDATE smf_messages
SET poster_email = '[email protected]'
WHERE poster_email = '';


This should add a "dummy" email address to any post missing.
Then try again to run the 2 queries that are returning errors (it should fix one of them)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

margarett

For the other error "posts cannot be null" run this:

UPDATE smf_members SET posts = IFNULL( (
SELECT count(*)
FROM smf_messages
WHERE (
smf_messages.id_member = smf_members.id_member
)
GROUP BY id_member ) , 0
)

instead of the query you were given (and that is also returning an error)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Sono

When I add this, it runs successfully.

UPDATE smf_messages
SET poster_email = '[email protected]'
WHERE poster_email = '';


But even so when I try to run the following query, it gives the error: "#1048 - Column 'poster_email' cannot be null"

UPDATE smf_messages SET `poster_email` = (
SELECT email_address
FROM smf_members
WHERE smf_members.id_member= smf_messages.id_member
)


The interesting is that I checked the smf_messages table, and I can see the fake e-mail added to the posts.... Strange.

This query works, however:

UPDATE smf_members SET posts = IFNULL( (
SELECT count(*)
FROM smf_messages
WHERE (
smf_messages.id_member = smf_members.id_member
)
GROUP BY id_member ) , 0
)



margarett

I'm sorry, I made a mistake in the first query, I should be adding the dummy email to the members table, not messages.
Nevertheless, it served it's purpose :P

Do you have, in smf_members, some rows with empty "email_address"?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Sono

The interesting is that when I click to reverse the order of e-mail addresses in smf_members, there isnt any row with empty e-mail.

So the answer is no.

I click this button:


margarett

Then I have no idea why that error happens :P

Anyway, all information should be converted. Welcome to SMF :D

I'd advise you to run the maintenance tasks, take care of membergroups, boards and permissions an then maybe use Spuds mod "Admin Toolbox" to recount your members totals.

Good luck ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Sono

Actuallyx it seems to me all members are transferred. a Lot of posts are there. So maybe it is not that big an error.

But let me ask you to confirm in what order shall I run these queries:

1.
UPDATE smf_messages
SET poster_email = '[email protected]'
WHERE poster_email = '';


2.
UPDATE smf_messages SET `poster_email` = (
SELECT email_address
FROM smf_members
WHERE smf_members.id_member= smf_messages.id_member
)


3.
UPDATE smf_members SET posts = IFNULL( (
SELECT count(*)
FROM smf_messages
WHERE (
smf_messages.id_member = smf_members.id_member
)
GROUP BY id_member ) , 0
)


Is this all I have to run at the end, or I should also run this?:


UPDATE smf_members SET posts = ( SELECT count( * )
FROM smf_messages
WHERE smf_messages.id_member = smf_members.id_member
GROUP BY id_member )


Or the query nr. 3 that you recommended can replace this last one?

margarett

1 replaces 2 (because you have no members without email)

3 replaces the other one.

So, if you didn't clear any data between having those errors and running those now, everything should be fine ;)

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Sono

Thank you very much.

It seems all members were transferred, there seems to be many posts, so I guess the essence is there :D

Thank you!

So this method works indeed. I can confirm now. This 2 last query is problematic, but the forum was transferred more or less. It is good because I am waiting for a solution to show up since last summer :D

scorbit

Quote from: wouterm on October 01, 2013, 07:23:43 AM
Hi,
I  succeeded to migrate from Wordpress BBpress2 plugin to SMF2.05.
These are the steps I made:

- Install SMF2.05
- Copy these 4  tables from the wordpress database to the SMF database: wp_posts, wp_postmeta, wp_users, wp_usermeta . (you can use mysql dumper)
- Run the mySQL commands (see attachment).

These commands will copy only the basic data (Usersnames + passwords, forum, topics and posts).

For me it worked. I hope this  can be useful for others

Hi all, I'm stuck on this same issue right now and could use some help...
I got through all steps, but when I run the mySQL command I get the following... any ideas?
Thanks!

Error
SQL query: Documentation

BBPRESS2_TO_SMF * * * COPY MEMBERS * * * INSERT INTO  `smf_members` (  `id_member` ,  `member_name` ,  `real_name` ,  `passwd` ,  `email_address` ,  `website_title` ,  `website_url` ,  `date_registered` ,  `posts` ,  `hide_email` ,  `avatar` )
SELECT ID AS id_member, SUBSTRING( m.user_login, 1, 80 ) AS member_name, SUBSTRING( m.user_login, 1, 255 ) AS real_name, m.user_pass AS passwd, m.user_email AS email_address, SUBSTRING( m.user_url, 1, 255 ) AS website_title, SUBSTRING( m.user_url, 1, 255 ) AS website_url, UNIX_TIMESTAMP( m.user_registered ) AS date_registered, 0 AS posts, 1 AS hide_email,  '' AS avatar
FROM wp_users AS m * * * COPY
AND UPDATE BOARDS / FORUM * * * INSERT INTO  `smf_boards` (  `id_board` ,  `board_order` ,  `name` ,  `description` )
SELECT ID, menu_order, post_title, post_content
FROM  `wp_posts`
WHERE  `wp_posts`.`post_type` =  'forum';


MySQL said: Documentation

#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 'BBPRESS2_TO_SMF

*** COPY MEMBERS ***

INSERT INTO `smf_members` ( `id_membe' at line 1

margarett

That's wrong...

What you need to run is just after INSERT INTO... Look at the file, it's quite explicit...

BBPRESS2_TO_SMF

*** COPY MEMBERS ***

INSERT INTO `smf_members` ( `id_member` , `member_name` , `real_name` , `passwd` , `email_address` , `website_title` , `website_url` , `date_registered` , `posts` , `hide_email` , `avatar` )
SELECT ID AS id_member, SUBSTRING( m.user_login, 1, 80 ) AS member_name, SUBSTRING( m.user_login, 1, 255 ) AS real_name, m.user_pass AS passwd, m.user_email AS email_address, SUBSTRING( m.user_url, 1, 255 ) AS website_title, SUBSTRING( m.user_url, 1, 255 ) AS website_url, UNIX_TIMESTAMP( m.user_registered ) AS date_registered, 0 AS posts, 1 AS hide_email, '' AS avatar
FROM wp_users AS m

*** COPY AND UPDATE BOARDS / FORUM ***

INSERT INTO `smf_boards`(`id_board`, `board_order`,  `name`, `description`)
SELECT ID, menu_order, post_title, post_content
FROM `wp_posts`
WHERE `wp_posts`.`post_type` = 'forum';


First line:
BBPRESS2_TO_SMF
Just a remark on what's inside the file
*** COPY MEMBERS ***
What the next operation(s) will perform
INSERT INTO `smf_members` ( `id_member` , `member_name` , `real_name` , `passwd` , `email_address` , `website_title` , `website_url` , `date_registered` , `posts` , `hide_email` , `avatar` )
SELECT ID AS id_member, SUBSTRING( m.user_login, 1, 80 ) AS member_name, SUBSTRING( m.user_login, 1, 255 ) AS real_name, m.user_pass AS passwd, m.user_email AS email_address, SUBSTRING( m.user_url, 1, 255 ) AS website_title, SUBSTRING( m.user_url, 1, 255 ) AS website_url, UNIX_TIMESTAMP( m.user_registered ) AS date_registered, 0 AS posts, 1 AS hide_email, '' AS avatar
FROM wp_users AS m

The actual SQL query that you need to run.

And so on, throughout the file ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: