Is 4.x-dev supposed to work with phpbb3 or phpbb2 only?

I'm asking because tables on this version are wrong for phpbb3, they are clearly phpbb2's.

    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'phpbb3_categories' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'phpbb3_posts_text' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'phpbb3_posts_text' doesn't exist

I guess I should use 3.x

Comments

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

In the phpBB migration configuration, did you set the PHPDB Table Prefix to phpbb3_? What are the actual table names in your database?

challenge’s picture

everything imported fine running version 3.x.
----------------------------------------------------------
back on 4.x dev:

tables in forum's DB use "phpbb3_" prefix, so I set them like that.
"brainstorming" is database name, "phpbb" is name of migration.

migration page shows this:

    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'brainstorming.phpbb3_categories' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'brainstorming.phpbb3_posts_text' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'brainstorming.phpbb3_posts_text' doesn't exist

	Task	Status	Items	Imported	Unprocessed	Messages	Throughput	Last imported
	phpbb_phpbb3_Avatar	Idle	1	1	0	0	45/min	2013-09-28 09:58:24
	phpbb_phpbb3_Categories	Idle	N/A	0	0	0	Unknown	2013-09-28 09:58:24
	phpbb_phpbb3_Forums	Idle	64	0	64	0	Unknown	
	phpbb_phpbb3_User	Idle	53	0	53	0	Unknown	2013-09-28 09:58:24
	phpbb_phpbb3_Topic	Idle	N/A	0	0	0	Unknown	
	phpbb_phpbb3_Post	Idle	N/A	0	0	0	Unknown	

if I run the migration:

    Processed 0 (0 created, 0 updated, 0 failed, 0 ignored) in 0 sec (0/min) - done with 'phpbb_phpbb3_Avatar'
    Migration failed with source plugin exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'brainstorming.phpbb3_categories' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'brainstorming.phpbb3_categories' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'brainstorming.phpbb3_categories' doesn't exist
    Skipped phpbb_phpbb3_Forums due to unfulfilled dependencies: phpbb_phpbb3_Categories
    Migration failed with source plugin exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'u.user_active' in 'field list'
    Skipped phpbb_phpbb3_Topic due to unfulfilled dependencies: phpbb_phpbb3_User, phpbb_phpbb3_Forums
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'brainstorming.phpbb3_posts_text' doesn't exist
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'brainstorming.phpbb3_posts_text' doesn't exist
    Skipped phpbb_phpbb3_Post due to unfulfilled dependencies: phpbb_phpbb3_Topic

You see it's searching for phpbb2 tables? I mean posts_text is a phpbb2 table, that on phpbb3 has another name. Same for categories table, it doesn't exist on phpbb3, I don't remember how they are stored but phpbb2drupal v3 import all correctly, so something happened on 4.x

CWSmith1701’s picture

I'm getting the same issue on mine with 2 phpbb forums to import, both on seperate databases, both installed phpbb3. THe prefix for them is phpbb_. But all I get when I run drush ms is this.

SQLSTATE[42S02]: Base table or view not found: 1146 Table            [error]
'darkscri_oldphpbb.phpbb_categories' doesn't exist
SQLSTATE[42S02]: Base table or view not found: 1146 Table            [error]
'darkscri_oldphpbb.phpbb_posts_text' doesn't exist
SQLSTATE[42S02]: Base table or view not found: 1146 Table            [error]
'darkscri_oldphpbb.phpbb_posts_text' doesn't exist
SQLSTATE[42S02]: Base table or view not found: 1146 Table            [error]
'darkscri_phpbb.phpbb_categories' doesn't exist
SQLSTATE[42S02]: Base table or view not found: 1146 Table            [error]
'darkscri_phpbb.phpbb_posts_text' doesn't exist
SQLSTATE[42S02]: Base table or view not found: 1146 Table            [error]
'darkscri_phpbb.phpbb_posts_text' doesn't exist

Group: dscribes            Total  Imported  Unprocessed  Status  Last imported 
 phpbb_dscribes_Avatar      81     0         81           Idle                  
 phpbb_dscribes_Categories  N/A    0         0            Idle                  
 phpbb_dscribes_Forums      39     0         39           Idle                  
 phpbb_dscribes_User        231    0         231          Idle    2013-09-28    
                                                                  18:57:02      
 phpbb_dscribes_Topic       N/A    0         0            Idle                  
 phpbb_dscribes_Post        N/A    0         0            Idle                  
                                                                                
 Group: evalemons           Total  Imported  Unprocessed  Status  Last imported 
 phpbb_evalemons_Avatar     11     0         11           Idle                  
 phpbb_evalemons_Categorie  N/A    0         0            Idle                  
 s                                                                              
 phpbb_evalemons_Forums     7      0         7            Idle                  
 phpbb_evalemons_User       137    0         137          Idle                  
 phpbb_evalemons_Topic      N/A    0         0            Idle                  
 phpbb_evalemons_Post       N/A    0         0            Idle        

I'm using migrate 7.x-2.6-rc1+13-dev with phpbb2drupal 7.x-4.x-dev

CWSmith1701’s picture

Issue summary: View changes

.

erwangel’s picture

Issue summary: View changes

Here are some changes I made in order to have 7-x-4.x-dev work with phpBB3:
First, I hade to tell it that phpBB version was 3 (it's internal detection mechanism did't work in my case). So
1) in phpbb2drupal.inc around line 32 (function __construct):

    parent::__construct($arguments);
	// BOF : force it to be version 3
    $this->arguments['phpbb_version'] = 3;
	// EOF
    $this->phpbbVersion = $this->arguments['phpbb_version'];

2) and around line 215 (function registerMigrations):

   if ($connection->schema()->tableExists($db_settings['db']['prefix'] .
    'attachments')) {
     $group_arguments['phpbb_version'] = 3;
   }
    else {
      $group_arguments['phpbb_version'] = 2;
    }
	// BOF : force it to be version 3
     $group_arguments['phpbb_version'] = 3;
	 // EOF

3) in file phpbb2drupal_core.inc around line 112 (PhpbbUserMigration/function query):

      $query->addField('u', 'user_jabber');
      // User type 2 is for anonymous and web crawlers
	  // BOF : changed user_type to group_id: 6=crawlers
//      $query->condition('user_type', 2, '<>');
      $query->condition('group_id', 6, '<>');
	  // EOF 

4) and finally around line 853 (PhpbbPostMigration/function query)

    // post_approved introduced in phpBB 3
    if ($this->phpbbVersion == 3) {
      $query->addField('p', 'post_approved');
      $query->condition('post_approved', 1);
	  // BOF : it should have be addField and not addFieldMapping
//      $this->addFieldMapping('p', 'post_subject');
//      $this->addFieldMapping('p', 'post_text');
//      $this->addFieldMapping('p', 'bbcode_uid');
      $query->addField('p', 'post_subject');
      $query->addField('p', 'post_text');
      $query->addField('p', 'bbcode_uid');
	  // EOF 

Be aware, this is a dirty solution, just for my needs. Hope it helps others in their migration or make one day this module work

amh5514’s picture

@mikeryan

I hope you haven't given up on this. To answer you questions

No, the table prefix name is "phpbb_".

And here are my phpbb3 tables: (I hope this helps)

phpbb_acl_groups
phpbb_acl_options
phpbb_acl_roles
phpbb_acl_roles_data
phpbb_acl_users
phpbb_attachments
phpbb_banlist
phpbb_bbcodes
phpbb_bookmarks
phpbb_bots
phpbb_config
phpbb_confirm
phpbb_disallow
phpbb_drafts
phpbb_extensions
phpbb_extension_groups
phpbb_forums
phpbb_forums_access
phpbb_forums_track
phpbb_forums_watch
phpbb_groups
phpbb_icons
phpbb_lang
phpbb_log
phpbb_moderator_cache
phpbb_modules
phpbb_poll_options
phpbb_poll_votes
phpbb_posts
phpbb_privmsgs
phpbb_privmsgs_folder
phpbb_privmsgs_rules
phpbb_privmsgs_to
phpbb_profile_fields
phpbb_profile_fields_data
phpbb_profile_fields_lang
phpbb_profile_lang
phpbb_ranks
phpbb_reports
phpbb_reports_reasons
phpbb_search_results
phpbb_search_wordlist
phpbb_search_wordmatch
phpbb_sessions
phpbb_sessions_keys
phpbb_sitelist
phpbb_smilies
phpbb_styles
phpbb_styles_imageset
phpbb_styles_imageset_data
phpbb_styles_template
phpbb_styles_template_data
phpbb_styles_theme
phpbb_topics
phpbb_topics_posted
phpbb_topics_track
phpbb_topics_watch
phpbb_users
phpbb_user_group
phpbb_warnings
phpbb_words
phpbb_zebra

amh5514’s picture

Category: Support request » Bug report
Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Needs work
amh5514’s picture

Status: Needs work » Active