Tried installing the module and received this error message:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mnasbo_dev_dru.profile_type' doesn't exist: SELECT p.* FROM {profile_type} p; Array ( ) in profile2_entity_info() (line 46 of /home/mnasbo/public_html/sites/all/modules/profile2/profile2.module).

Module does not seem functional if I continue past that.

Comments

shaisamuel’s picture

same

I checked the database and it looks like the table profile_type doesn't exists.

The error happen while the installation was in process. The UI resulted with the error "The website encountered an unexpected error. Please try again later." and error log shows this error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ecodev_dev.profile_type' doesn't exist: SELECT p.* FROM {profile_type} p; Array ( ) in profile2_entity_info() (line 46 of /home/ecodev/public_html/sites/all/modules/profile2/profile2.module).
sandergo90’s picture

I've had this problem to and with my installation the problem was the UUID module. This module does a uuid_schema_alter. in this function it does module_invoke_all('entity_info'). Therefore the profile2_entity_info() hook gets executed. This hook does:
$types = db_select('profile_type', 'p')
->fields('p')
->execute()
->fetchAllAssoc('type');
At that moment the hook schema from profile2 isn't executed so it throws an error.

The solution was to enable first profile2 and after that UUID.

autopoietic’s picture

thanks sandergo90!

that saved me a lot of time!

nedjo’s picture

Status: Active » Closed (duplicate)