Errors porting Drupal6 to Flarum #84
Replies: 6 comments
-
You've made enough changes you may have found a novel error I won't be able to debug. What is the name of the Drupal 6 plugin you're using for the forum? |
Beta Was this translation helpful? Give feedback.
-
I used AdvancedForum 6 and a bunch of other plugins (comment_edited etc). At first I tried using AdvancedForum7 as a source for NitroPorter but that gave plenty of errors and I thought starting with Drupal6 source will be better. |
Beta Was this translation helpful? Give feedback.
-
I see that discussions are getting successfully inserted into PORT_Discussion table. I tried running manually the following sql:
and it executed without error, inserted one row in FLA_discussions. I hope I understood correctly the correspondece of PORT_Discussion and FLA_discussions columns. Was not sure what post_number_index is so used NULL for it. Also there is no slug in PORT_Discussion so used NULL for it as well. So it's quite confusing why data is being inserted into PORT_Discussion without problem but errors out when going from PORT_Discussion to FLA_discussions. |
Beta Was this translation helpful? Give feedback.
-
OK, next tried inserting all rows without LIMIT 1:
Got duplicate key error, maybe that is the reason for NitroPorter error. Will investigate further. |
Beta Was this translation helpful? Give feedback.
-
Yes, that was the reason, node and node_revisions tables in Drupal 6 contained several rows with identical nid but different vid (i. e., some discussions had several revisions saved in these tables, which I guess is fine for Drupal 6). So using left join to extract discussions from Drupal tables resulted in duplicate rows in PORT_Discussion with the same DiscussionID. PORT_Discussion does not require DiscussionID to be unique, but FLA_discussions does, therefore the error above when moving discussions from PORT_Discussion to FLA_discussions. So I just added However there are next errors, will report on these later. |
Beta Was this translation helpful? Give feedback.
-
@linc, I'm not an expert in PHP or SQL, and don't fully understand how NitroPorter functions. This is the code from your (unmodified by me) Drupal 6 source file:
It seems that it doesn't extract Comment ID (cid) form the Drupal database, does it?… Or does that happen somewhere else in the code? |
Beta Was this translation helpful? Give feedback.
-
I'm trying to export my Drupal 6 forum to Flarum.
First error was:
PDOException SQLSTATE[42S02]: Base table or view not found: 1146 Table 'oldforum.nodeforum' doesn't exist
Looked at the database and found out that for some reason table 'nodeforum' is called 'forum' there, so I changed that in the Drupal6 source file. Now discussions are being exported successfully with this one change.
Instead of table 'node_comments' I have just 'comments'. Changed that in the Drupal6 source file and removed all the different joins as well. Now comment are being exported successfully.
PM import was giving more errors so commented that out for now.
However now I'm getting 'Operation not permitted' error when NitroPorter is inserting discussions from intermediate table to flarum table. Any idreas why?
Beta Was this translation helpful? Give feedback.
All reactions