Hello chaps,

I had some really fierce errors with Microdata, so I disabled the module and deleted the files from the /sites/all/modules directory and then cleared my caches. After attempting to reinstall - I get this message:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'thetenor_tenor.dr_microdata_mapping' doesn't exist: SELECT mapping AS mapping FROM {microdata_mapping} microdata_mapping WHERE (type = :db_condition_placeholder_0) AND (bundle = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => comment [:db_condition_placeholder_1] => comment_node_page ) in _microdata_load_mapping() (line 864 of /home/thetenor/public_html/sites/all/modules/microdata/microdata.module).

Looking in the database I can't find any tables with 'micro', 'data' or 'microdata' in their names.

Comments

daemonchrist’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

Unable to reproduce. Sounds like the module might not have been completely uninstalled...

arpieb’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Status: Closed (cannot reproduce) » Active

Yeah, I'm seeing the same thing on a fresh install of the module from the 7.x-1.x branch, commit 0a6b2d9244c0b735c567ae3fa09e4be1789daa7b:

$ drush en -y microdata
The following extensions will be enabled: microdata
Do you really want to continue? (y/n): y
WD registry: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table                         [error]
'rbates.microdata_mapping' doesn't exist: SELECT mapping AS mapping
FROM
{microdata_mapping} microdata_mapping
WHERE  (type = :db_condition_placeholder_0) AND (bundle = :db_condition_placeholder_1) ; Array
(
    [:db_condition_placeholder_0] => bean
    [:db_condition_placeholder_1] => nc_alerts
)
 in _microdata_load_mapping() (line 958 of
/opt/development/rbates/build/html/sites/all/modules/contrib/microdata/microdata.module).
WD php: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rbates.microdata_mapping'   [error]
doesn't exist: SELECT mapping AS mapping
FROM
{microdata_mapping} microdata_mapping
WHERE  (type = :db_condition_placeholder_0) AND (bundle = :db_condition_placeholder_1) ; Array
(
    [:db_condition_placeholder_0] => bean
    [:db_condition_placeholder_1] => nc_alerts
)
 in _microdata_load_mapping() (line 958 of
/opt/development/rbates/build/html/sites/all/modules/contrib/microdata/microdata.module).
Cannot modify header information - headers already sent by (output started at                                [warning]
/usr/local/src/drush/includes/output.inc:38) bootstrap.inc:1233
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'rbates.microdata_mapping' doesn't exist: SELECT mapping AS mapping
FROM
{microdata_mapping} microdata_mapping
WHERE  (type = :db_condition_placeholder_0) AND (bundle = :db_condition_placeholder_1) ; Array
(
    [:db_condition_placeholder_0] => bean
    [:db_condition_placeholder_1] => nc_alerts
)
 in _microdata_load_mapping() (line 958 of /opt/development/rbates/build/html/sites/all/modules/contrib/microdata/microdata.module).
Drush command terminated abnormally due to an unrecoverable error.                                           [error]

I'm guessing there's something wrong with the schema defined in microdata_schema as neither that table nor cache_microdata_vocabulary gets created. I'll see if I can find the error and create a patch for it.

arpieb’s picture

OK, this is interesting - dropped my database, re-installed my site from scratch again and enabled the module, and now the tables get created properly. Maybe there's some race condition between hook_schema and hook_entity_info_alter...?