After a few seconds migration is stopped with this error: Oops! Something went wrong. Please reload the page and try again
I can see that some users have been imported.
After a few seconds migration is stopped with this error: Oops! Something went wrong. Please reload the page and try again
I can see that some users have been imported.
FBI The flarum log includes errors in case something fails while migrating
MichaelBelgium looking at log records may be insufficient. Because too many topics and user forums, there is a transition problem and this problem is not recorded in the log file.
MyBB -> FluxBB -> Flarum
I successfully performed the transition scripts.
2K users
30K post
10K Thread
were available.
I'd appreciate it if you tested it. So I don't have to deal with FluxBB. Although all errors in log records are corrected, it still gives error. Even if I activate Debug mode, unfortunately there is no error. As a result, we don't know what the mistake was.
MichaelBelgium no info in log.
HalilHanBadem I tried but failed to migrate from myBB 1.8 to Flux using this converter: https://github.com/fluxbb/converter Many errors occurred during conversion. Apparently not updated.
How did you convert?
I used it.
The resulting one was a two error table sourced. I corrected the error description and ran the transition script again and again. Then there was no problem.
I used this to switch from FluxBB to Flarum:
HalilHanBadem looking at log records may be insufficient. Because too many topics and user forums,
I mean the error log? Its the one thing that helps if something goes wrong
edmarholanda There must be something ...
MichaelBelgium An error that I cannot fully resolve is not included in the log file. I can easily fix all the errors in the log file. The problem is here. The log file does not process data at that error.
MichaelBelgium Here? ![https://image.prntscr.com/image/QfBKMHSETkiU-tlUSWMs7g.png]
MichaelBelgium Do I find log information in another folder?
Hi @MichaelBelgium. Thank you so much for making this extension. I was wondering if you could help me out with this error in the flarum log: "Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails"
It seems to only happen when the option Migrate threads and posts is checked. Users migrate successfully without error but threads only partially migrate before the error Oops! Something went wrong. Please reload the page and try again. appears.
Any idea on how to fix it?
Emotion On which foreign key contraint does it fail?
MichaelBelgium It looks like this:
Next Doctrine\DBAL\Driver\PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
sqlDatabase.
posts, CONSTRAINT
posts_user_id_foreignFOREIGN KEY (
user_id) REFERENCES
users(
id) ON DELETE SET NULL)
I can send you the log if you want to take a look at it. Probably can't paste it here since it's so long.
Emotion hmm I assume it wants to create a post and associate a non existing user to it, what does the latest foreign key error say? (sql command SHOW ENGINE INNODB STATUS
=> latest foreign key error - assuming that error was the last one)
Yeah, that's what seems to be happening. What do you think is causing it to do that? Here's the output of the command, let me know if this is what you wanted to see. Also I changed the database name to sqlDatabase and changed the email a bit for security reasons.
Foreign key constraint fails for table
sqlDatabase.
posts:
posts_user_id_foreign
,
CONSTRAINTFOREIGN KEY (
user_id) REFERENCES
users(
id) ON DELETE SET NULL
posts_user_id_created_at_index` tuple:
Trying to add in child table, in index
DATA TUPLE: 3 fields;
0: len 4; hex 00000000; asc ;;
1: len 5; hex 998da778aa; asc x ;;
2: len 4; hex 00000101; asc ;;
But in parent table sqlDatabase
.users
, in index PRIMARY
,
the closest match we can find is record:
PHYSICAL RECORD: n_fields 18; compact format; info bits 0
0: len 4; hex 00000001; asc ;;
1: len 6; hex 00000834719c; asc 4q ;;
2: len 7; hex 4c000001ba0dd8; asc L ;;
3: len 7; hex 456d6f74696f6e; asc Emotion;;
4: len 23; hex 61646d696e40656d6f74696f6e666f72756d732e636f6d; asc [MYEMAIL]@emotionforums.com;;
5: len 1; hex 81; asc ;;
6: len 30; hex 243279243130244e544f6267595a71596b66594b2f3265336d39366f2e6b; asc $2y$10$NTObgYZqYkfYK/2e3m96o.k; (total 60 bytes);
7: SQL NULL;
8: len 12; hex 6176617461725f312e6a7067; asc avatar_1.jpg;;
9: SQL NULL;
10: len 5; hex 998d7b5ba1; asc {[ ;;
11: len 5; hex 99a59e3afa; asc : ;;
12: SQL NULL;
13: SQL NULL;
14: len 4; hex 0000002d; asc -;;
15: len 4; hex 00000110; asc ;;
16: SQL NULL;
17: SQL NULL;
`
Emotion Yeah, it wants to link a non-existing user to a post. It would be great if you can find out which user it wants to link.
It says the closest match is id 1 so i'm leaning towards my last point
Michael is right... need one-by-one query each related data. And use dummy (backup) databefore real migration..
just FYI
My personal opinion, this is most powerful migration tool ever made for Flarum to accommodating MyBB user like me. I've been trying before. Since my forum is huge 1-2 million posts, I decide to manually one per one converted (manually). Not using this extension.
Mostly, converting tool is easily working for small/medium size of MyBB.. But, for big forum it will create some "time-out" behavior or others unpredictable results. Server skill is also needed for this case..
If you need convert.. First: Category (Tag), sub forum, then continue with bigger size such users and finally posts it self.. Please comment-out the procedure inside this script (need PHP skill), one by one before continue next step.
I keep my old forum for archived purposes. Both exactly same (Flarum, MyBB, PHPBB and SMF)
Eh, not sure how to execute a query to search the mybb database for posts where the user doesn't exist.
Anyway, I decided to move to nodeBB. Flarum is great but I didn't realize just how underdeveloped it currently is. It's missing many features that I consider essential. I'll probably move back to flarum once it's developed more. I don't like that nodebb requires a rebuild and/or restart for almost everything you change.
I used the nodebb importer to import the mybb database and it worked fine without errors. But it looks like there were a few guest posts and threads so maybe this is what was causing the error in your flarum importer?
Regardless, thanks for the help.
Emotion But it looks like there were a few guest posts and threads so maybe this is what was causing the error in your flarum importer?
100% yes. They don't exist in the user table hence the importer can't find the user it wants to associate the post to. I can fix this issue in the importer and notify u when its done
Released version 4.2 which fixes importing guest posts/threads
New note: A guest who created a MyBB post or thread will appear as a deleted user in Flarum and not specifically a "guest".
@Emotion U could try it out and tell me if it works or not
MichaelBelgium Well I'm not planning on using flarum until it's more developed, but since you made this free tool and fixed the issue I pointed I would feel bad if I didn't test it out for you. I just tried it out and it works now without error.
Honestly though, your tool is even better than the nodebb importer. Yours imports avatars and respects the hierarchical structure of a forum. On the other hand, the nodebb doesn't automatically categorize threads under their appropriate forum.
Anyway, thanks again for making this tool and for the great support. Keep up the great work!