I believe this may have been mentioned before, but I still can't update this module.
Running drush updatedb after swapping in the new code results in this:
Cannot change the definition of field <em class="placeholder">registration</em>.<em class="placeholder">state</em>: field doesn't exist. [error]
Performed update: registration_update_7100 [ok]
array_keys() expects parameter 1 to be array, null given common.inc:7029 [warning]
array_keys() expects parameter 1 to be array, null given common.inc:7029 [warning]
WD menu: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cgshr.registration_type' doesn't exist: SELECT base.* [error]
FROM
{registration_type} base; Array
(
)
in EntityAPIController->query() (line 187 of /home/resonetrics/domains/cgshr.resonetrics.com/public_html/sites/all/modules/entity/includes/entity.controller.inc).
in_array() expects parameter 2 to be array, null given entity.module:816 [warning]
Missing database columns for the exportable entity registration_type as defined by entity_exportable_schema_fields(). Update the according module and run update.php! [warning]
entity.module:817
in_array() expects parameter 2 to be array, null given entity.module:816 [warning]
Missing database columns for the exportable entity registration_state as defined by entity_exportable_schema_fields(). Update the according module and run update.php! [warning]
entity.module:817
On the site, I get a PDO exception and the site is unusable
Error messagePDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cgshr.registration_type' doesn't exist: SELECT base.id AS id, base.name AS name, base.label AS label, base.weight AS weight, base.locked AS locked, base.data AS data, base.status AS status, base.module AS module FROM {registration_type} base; Array ( ) in EntityAPIController->query() (line 187 of /home/resonetrics/domains/cgshr.resonetrics.com/public_html/sites/all/modules/entity/includes/entity.controller.inc)
My fix will be (I hope) - roll back to previous snapshot, disable and uninstall registration, install new version. Fortunately this is a new site, with no actual registrations in place as yet - and methinks that may be what's causing the error.
Comments
Comment #1
deanflory commentedI too am now getting these after restoring a backup on a server with updated PHP, etc.
Registration 7.x-1.3+2-dev
Registration Entity Access 7.x-1.3+2-dev
Registration User Enrollment
Registration Views 7.x-1.3+2-dev
Registration Wait list 7.x-1.3+2-dev
Comment #2
deanflory commentedChanging this to "Needs work" to garner more attention since this issue is over a year old with no replies.
Comment #3
deanflory commentedCompletely disabling, uninstalling, removing entries from the forward_statistics table, and then re-enabling seems to have fixed this issue.
Comment #4
bartk commentedHere's what I did to address this issue. I went to my mysql command prompt and ran the following:
After that, the updates ran without any issues. Please note that I haven't tested the module after doing this, so it's possible that there are other problems with this method.
Comment #5
museumboy commentedThanks BartK. You saved my butt.
#4 works for me.
Comment #6
john.oltman commented