Closed (fixed)
Project:
phpBB2Drupal
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Dec 2007 at 03:07 UTC
Updated:
14 Mar 2008 at 00:11 UTC
Jump to comment: Most recent file
This module needs to be ported to Drupal 6. Drupal 6 has changes in the install/uninstall system, and also adds a database schema.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | phpbb2drupal.users_.txt | 8.8 KB | naheemsays |
| drupal6install.patch | 4.27 KB | naheemsays |
Comments
Comment #1
naheemsays commentedThe above patch also removes an old update hook from the database as I doubt many people will be updating an older phpbb2drupal install. It is a one time use module. Import the data, remove the module.
Should I leave that update hook in?
the schema code was taken from schema.module, which shows what schema's are currently on there. If someone wants to document the schema, all will be good.
Comment #2
naheemsays commentedThe above patch to the install file and other changes as suggested by coder.module have now been applied to HEAD.
Some coding standards issues still remain, but I am not sure whether they are problems with the coder module or with this module.
The changes are currently untested.
Comment #3
beginner commented1) Thanks for taking oven the module. Congratulations on your first module maintainership.
2) I have re-subscribed to all issues, so that I can assist you where I can in your first steps.
3) Beware of coder module. Unless it has been updated, it will report that TRUE and FALSE should be changed to true and false, which is against the Drupal coding standards. If in doubt, ask the dev mailing list (are you subscribed?).
Comment #4
naheemsays commentedThe "speed improvements" which suggested such changes in the coder module have been removed from it in the last release (august time - version 2.6.)
I have also removed the hook_uninstall as the tables are needed by other modules (phpbb_redirect) after import.
My current "problem" is changing this menu hook:
Which according to the docs (http://drupal.org/node/103114) it should become:
But that does not work. Seems like I will need to delve deeper into the docs.
Comment #5
naheemsays commentedThere are four places in the module where
drupal_next_idis used. Can this be safely replaced bydb_last_insert_idor (as I suspect) will the functions need to be changed? ()Comment #6
naheemsays commentedStatus report for current HEAD:
1. User import works properly from my limited tests.
2. Forum creation called a function which no longer exists. I changed this. Forum and category creation works.
3. Topics and polls are imported.
However neither seem to be associated with their forum. This is how it was for poll before Drupal 6, but not for topics. I need to fix the topic import to associate with the forum, and also try to change the poll import to do the same thing.See next post.4.
Comment import does not work.Fixed in HEAD (revision 1.54)5.
Private message import does not work.PM Import may/May not work - can't tell yet as there is no privatemsg module for Drupal 6 to allow testing.6.
The link to start import on the settings page does not show.7.
Improve the options to change encoding settings.http://drupal.org/node/67068#comment-675586 for more details.Comment #7
naheemsays commentedCurrent HEAD now does link forum topics to the correct forum. If you allow polls in forums (you need to edit the forum vocabulary, tick the option allow polls), they will also show in the forum. I will need to add a message informing the user about this.
I have added fixes to Privatemsg import and file attachments. Both are untested. (since there currently is no privatemsg port for Drupal 6, we may need to wait for it. I al do not have any forum data with attachments.)
Known bugs:
1. I don't think the comments are getting the correct timestamp. It seems to be current. however I am getting the same for Drupal 5 branch (2.0 release and 3.x-dev). I will probably need to deal with this the way the topic import does - paste the timestamp directly to the database.
2. drupal_convert_to_utf8() does not seem to work correctly. I may using the incorrect encoding settings. (I will deal with this in here: http://drupal.org/node/67068)
3. For yesterdays Drupal branch, I am getting undefined errors for some forum functions and the phpbb2drupal_selected session variable.
I also want to clean up the check to see whether the bbcode stuff exists.
In short this module now needs a lot of testing.
Comment #8
naheemsays commentedWould it be a good idea to move to the new batch api that is available for Drupal 6? This probably would be slower than what we do now, but it would have the benefit of not timing out.
Comment #9
beginner commentedI don't know much about the new bath api, so I can't provide any meaningful advice.
If you are feeling up to doing it, why not? Slow and reliable is better than time-outs.
Comment #10
naheemsays commentedAnother status update. I have been playing around unsuccessfully with the batch api for the last couple of weeks - no success even at the first step (User import).
Batch api seems to be easier to do many things to one piece of data than to do one thing to many pieces of data.
Main problem is I cannot seem to break down the while loop. in import users:
while ($result = db_fetch_object($user_ids)) { //Do something }If I set that up to define the operations (for each user id run the batch import function...) I get an out of memory - that initial step is not batched, and loading all operations at once is memory consuming.
The other approach that I have tried is to get a single user id, run the batch operation, get the next id. I am sure this should work, but I am being extraodinarily stupid somewhere.
I have got some incredibly hacked up functions that do not do the job. hacks upon hacks.
Either way, anyone got any tips on how to break up the while loop? That is the key to it all coming together. or not.
Add this to the hook_menu:
and put the attached file (rename from.txt to .inc) into the module folder (get the HEAD Branch) to test what I have, but be warned - it does not work.
Apart from this batch stuff, import works for users/topics/poll/comments (not tested PM as there is no privatemsg for Drupal 6 yet...), but I get a set of around 6 or so errors that need to be fixed - two may have disappeared now by a recently applied (sunday I think) patch to core.
Comment #11
naheemsays commentedWith Drupal 6-rc3, most of the error messages have disappeared. None remain for user import/create forums/Import topics. Import of polls does have one message per imported poll that I have not looked into too carefully:
No idea what is wrong there as the code is identical to that for poll_insert in the poll.module.
Apart from that, the forums listing shows the wrong time for the last post in that forum (but the stuff inside is correct and so is the comment time...), but that can probably be ignored. I have updated (but not tested) pm migration.
There is also an issue with forum pagination (shows mroe pages then there are), but I am certain i have seen a bug report for Drupal with this mentioned so it is probably not a phpbb2drupal issue.
EDIT - seems that was a different issue: http://drupal.org/node/208858
Comment #12
naheemsays commentedJust branched for Drupal 6.x and released the first development snapshot:
http://drupal.org/node/220150
Comment #13
naheemsays commented1.0 release has just been made.
Comment #14
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.