After import Posts don't show
Hawkcode - October 6, 2009 - 23:19
| Project: | phpBB2Drupal |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
Hi,
Apparently It imported posts, but the only thing showing is the Containers and the topics, no posts are showing. This is a totally empty forum.
I didn't import the users, could that have anything to do with it.
TIA
Rich

#1
yes. you need to have a user account listed and mapped on phpbb2drupal_temp_user for each user whose posts you want imported. (it should also be the same for the topics?)
#2
Hi,
I redid the whole exercise, importing the users, 350 imported. No errors on any of the rest.
Any ideas, do you want to see the tables?
Thanks Rich
#3
WHen importing the posts, are there any messages shown on the page? if you look in the database, are there comments in the comment table? how about the mapping in the phpbb2drupal_temp_post table?
(I assume you have already imported the topics/nodes? and by topics you did not mean the different boards?)
#4
There are comments in the comments table. Also the phpbb2drupal_temp_post is populated.
Under Forums I have 2 Containers and under them 4 Topics, not sure if my terminology is correct. Under the topics No Posts.
I'm a newbe as far as Drupal Programming, but I am good with PHP and MySql. Do you want me to zip up the phpbb2drupal_temp_* tables?
Thanks
Rich
#5
By topics I think you mean forums and not forum topics? as in you click them and then you get a list of forum topics instead of reading the actual node.
If that is the case, then there would be a problem mapping the taxonomy term with the forum.
Did you import the forums, delete them and then reimport them? that way there may be duplicate data which is what is causing the problems.
Your two options would be:
1. Start again from scratch. delete everything (making sure all the phpbb2drupal tables are empty) and then re import the data
2a. Make sure the taxonomy terms that were imported are in the forum taxonomy. Go to the taxonomy admin page and make sure there are no duplicates, and the ones registered in the forum taxonomy are the same ones in the phpbb2drupal_temp_forum table.
2b. If there are only a few actual forum topics (instead of forums which is what I think what you mean...) then you can manually map the data to the correct forum term in the term_node table.
#6
I'll bet the Taxonomy is what is screwing it up. I Have virtually nothing in there.
One thing I have had a lot of trouble is getting a handle on what each table is, there does not seem to be a detailed scheme.
If you can give me an idea of how the forum stuff relates, maybe I can modify the tables manually:
I created some test data:
d_term_data: 2 recs
tid vid Name Desc Weight
24 1 Test 0
25 1 TestContaner 0
D_Term_hiearchy:
tid Parent
24 25
25 0
d_vocabulary_node_types
vid type
1 forum
#7
you can see what each table does by having a look in the phpbb2drupal.imstall file. an online version of that can e seen here: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/phpbb2drupa...
The important table which stores the taxonomies/forum data is phpbb2drupal_temp_forum and that needs the mapping data present before importing the topics or the comments/posts.
Just as a quick overview, both phpbb categories and boards are taxonomy terms in drupal (that are a part of the forum taxonomy). Forum topics are and polls are forum topic nodes (the poll data is currently not imported). Their mapping is stored in the phpbb2drupal_temp_topic table.
the forum topic and poll replies are comments and their mapping is stored in the phpbb2drupal_temp_post table.
#8
the easiest way is probably to do the import all over again - and after each step make sure the related phpbb2drupal table has the correct mapping data.
#9
So I will need to change the Mapping of the Taxonomy TID in your table to the Like TID in in my drupal tables, and then ripple that down through all the php2drupal tables.
I should do that after each step, but when does the data in the temp tables move into drupal? Is it after the url step?
Thanks for your patients!
Rich
#10
it happens while the import is being done.
WHen you import the users, the temp_users table is filled with the mapping. WHen you import the forums and categories, the temp_forum table is populated.
At this point, make sure that the data in the phpbb2drupal_temp_forum is correct and if not, correct it. After this, the node and comment import should be simple.
(I assume you are importing from phpbb3? if not, for phpbb2 you need to use phpbb2drupal 1.x)
#11
I Stopped it After Import Catagories,
Looked at the temp table and every entry maps. The php2Drupal_temp_forum, every TID maps to the identical forum ID from phpBB.
I have taken a snapshot of the DB before I go on.
So it seems it should work.
I finished it, heres my forums page:
ASPE HQ
-- ASPE Bylaws - Review and Discuss ASPE Bylaws Draft
--General Chat - General ASPE Discussion
--Plumbing Systems & Design - The official publication of ASPE
--Site News and Updates
Committees
--Education
-- Legislative
-- Membership
--Technical & Research
Convention and Technical Symposium
--2006 ASPE Convention
--2008 COnvention
Now all the posts came in, they just don't seem to have a home.
I can grab a node ID from phppbb2Drupal temp Topic and put it in the address /node/### and it comes up.
This is so close.
Thanks
Rich
#12
Have a look in the term_node table to see if the nodes are mapped to the correct forum term? if they are, make sure the forum term is mapped to the correct vocabulary.
It seems that things have gone awry at one of the mapping stages.
#13
There is nothing in the term_node table.
In the vocabulary there is 1 record:
1 Forums 0 1 0 0 0 forum -10
What am I missing?
Rich
#14
In the term_node table there is supposed to be an entry for each imported node mapping it to the correct term/forum.
To test, you can get a tid and vid from the node_revisions table and a tid from the term_data table.
I doubt you want to do this manually, so at this point you need to investigate what is going wrong as it seems to be working for everyone else. You might try importing with the HEAD release as that may have some relevant bugs fixed in it too.
Other questions - what version of phpbb are you using? What version of Drupal? do you have anything special in your database? does the phpbb2drupal_temp_forum have the correct values in it? (I think you already answered yes to this bit).
Other than that, I am at a loss.
#15
I will look at this later. I am running PHP 5.2.1 and MySql 5.1.37.
Drupal is 6.12.
How do I get the head realese? Do I download all the files from:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/phpbb2drupa...
and replace the files I have with these?
Is is possible that there is something screwed up in the PHPBB tables that would cause this. This originally came from ibf Power Boards. The PHPBB guys have a program to import their stuff.
Thanks for all your help.
Rich
#16
or from here: http://drupal.org/node/96005
#17
Sorry to say the Head version had no effect on the outcome.
We have Advanced Forum installed, could this be screwing something up?
Thanks
Rich
#18
No, that should not cause any problems.
I have no idea what makes your install different to break this. A long arduous way to fix it is to add the forum mapping manually - but that is not an option if you have many topics. Or write a short script that does it for you.
(Do you have the forum topic selected as a valid content type for the forums? this would afaik be set in the taxonomy settings.)
#19
I think I found it...
This was an import from ipf Power Boards.
I disconvered that there are no forums listed in phpBB after the import to them. I never looked, Stupid I gues.
I will have to get in touch with them.
I'll keep you posted.
#20
We do not have a lot of topics. I've been trying ever since I got started with Drupal to find a good shcema that shows all the relations with drupal. As of yet I have not found one.
How can I determine if I have a forum topic selected as a valid type?
Can you tell me how the tables for Forums are related? Of point me in a direction.
Thanks
Rich
#21
you can see what content types are allowed in the forums by going to Admin >> content Management > taxonomy and then click edit on the forum vocabulary - all content types allowed in the forums should be ticked on that page.
each forum has a tid and then what you need to do to put it in the forum is to create a row in term_node which has the node nid, the highest (or one row per vid per nid) vid from node_revisions (with the import, if there was no data there before, this will likely be the same as the nid) for that none and the tid for the taxonomy term.
Inset them into the term_node data and you will see the topic show up in the relevant forum.
Since this is a bug in the conversion to phpbb, have you reported the bug there so that they can get it fixed? as without the correct mapping, even in phpbb the chances are that the topics are in the wrong table.
#22
Forum Topic was the only Node Type Under Forums Taxonomy.
Do I need to enable Nodes and Pages? The posts came over as forum topics.
Thanks
#23
No, that is fine. You can allow for different content types in forums in there, but only forum topics are needed for the import and since you have mentioned that the error was elsewhere. so it was unlinked.
#24
Thanks so much for your help.
What I ended up doing is putting them all under 1 Forum "Archives from old site"
Everything is there and this will work great.
Now I can move on with the rest of the site.
Thanks Again!
Rich