Upon updating to Linkit 7.x-3.3 I'm getting this FAIL:
The following updates returned messages
linkit module
Update #7302
Failed: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'role_rids' in 'field list': UPDATE {linkit_profiles} SET name=:db_update_placeholder_0, admin_title=:db_update_placeholder_1, data=:db_update_placeholder_2, role_rids=:db_update_placeholder_3, weight=:db_update_placeholder_4 WHERE (pid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => basic [:db_update_placeholder_1] => Basic [:db_update_placeholder_2] => a:10:{s:11:"entity:node";a:4:{s:18:"result_description";s:156:"[node:field_image] [node:title] | [node:content-type] | [node:url]";s:7:"bundles";a:6:{s:7:"article";i:0;s:4:"page";i:0;s:4:"book";i:0;s:5:"panel";i:0;s:4:"poll";i:0;s:7:"webform";i:0;}s:15:"group_by_bundle";i:0;s:19:"include_unpublished";i:0;}s:11:"entity:file";s:6:"entity";s:20:"entity:taxonomy_term";a:3:{s:18:"result_description";s:0:"";s:7:"bundles";a:2:{s:4:"tags";i:0;s:6:"forums";i:0;}s:15:"group_by_bundle";i:0;}s:11:"entity:user";a:1:{s:18:"result_description";s:0:"";}s:4:"imce";a:1:{s:8:"use_imce";i:0;}s:12:"autocomplete";a:3:{s:9:"charLimit";i:3;s:4:"wait";i:350;s:13:"remoteTimeout";i:10000;}s:10:"attributes";a:5:{s:3:"rel";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:5:"class";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:9:"accesskey";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:2:"id";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:5:"title";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}}s:14:"search_plugins";a:6:{s:11:"entity:node";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:1;}s:17:"linkt_panel_pages";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:1;}s:11:"entity:file";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:11:"entity:user";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:20:"entity:taxonomy_term";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:12:"linkit_views";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}}s:17:"attribute_plugins";a:6:{s:3:"rel";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:5:"class";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:9:"accesskey";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:2:"id";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:5:"title";a:2:{s:6:"weight";s:1:"0";s:7:"enabled";i:0;}s:6:"target";a:2:{s:7:"enabled";i:0;s:6:"weight";i:-10;}}s:13:"insert_plugin";a:2:{s:6:"plugin";s:7:"raw_url";s:10:"url_method";i:1;}} [:db_update_placeholder_3] => N; [:db_update_placeholder_4] => 0 [:db_condition_placeholder_0] => 1 ) in drupal_write_record() (line 7239 of /.../includes/common.inc).
I'll try disabling, uninstalling and then re-enabling, but clearly something is wrong.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | linkit-cached-schema-update-2405093-8.patch | 449 bytes | eelkeblok |
| #6 | 2405093-linkit-profile-export-updated.txt | 2.85 KB | mstrelan |
| #6 | 2405093-linkit-profile-export.txt | 2.67 KB | mstrelan |
Comments
Comment #1
anonUpgrading from what version?
Is your prev linkit profiles exported in some way, like features or in code?
Comment #2
anonalso, uninstall linkt_panel_pages and linkit_views.
Comment #3
deanflory commentedI'm not sure what the previous version was. Not exported in features or code.
Reinstalled all linkit modules and submodules and don't seem to have the issue anymore.
Comment #4
anonI close this for now.
Feel free to open it again if someone else have this problem.
Comment #5
troybthompson commentedI got this error upgrading from 2.6. I didn't save a copy of the settings beforehand, but I have other sites to upgrade so I can do so if that helps. I typically just have one profile setup for LinkIt.
Comment #6
mstrelan commentedI experienced this issue upgrading from 7.x-2.5 to 7.x-3.3. LinkIt profile export attached. This was stored in a features module. I updated the export to the new format and running the update works this time. Had to "revert" the profile to the new code version after running update.php.
Comment #7
radimklaskaSame here during 7.x-2.5 to 7.x-3.3 update. Profile exported in features.
Looks like 7.x-2.5 to 7.x-3.2 works fine.
Comment #8
eelkeblokI experienced this problem as well. It seems to have to do with the old schema that is still cached when update 7302 does its thing. Something somewhere calls drupal_write_record() (mentioned in the error message). That function uses drupal_get_schema() to get the database schema and figure out which columns are valid for a given database table. The schema still has the definition for the role_rids column, which causes drupal_write_record() to produce an invalid query and subsequently causing the error. (This is all speculation based on that I saw drupal_write_record mentioned in the error message).
This probably only happens when you run update 7300 (which removes the column) and 7302 in one sitting. FWIW, if you run into this problem, just rerunning update.php should work (it seems to have done for me), because at the end of update.php, caches are cleared, so the schema gets reloaded. Running update 7302 then should go fine.
The attached patch forces the schema to rebuild right after the database changes were done in update 7300. I ran things on our testing environment with the patch applied and I did not get the error.
Note that if you did get this error, applying this patch and rerunning the update on the same environment does not constitute a valid test of this patch. You will need an environment that has not been updated from 2.x to 3.x yet (or more specifically, that has not had linkit_update_7300() ran yet) to be able to test this patch.
Comment #12
eelkeblokI'm thinking the failing test has nothing to do with this patch, but I might be wrong. Could anyone more at home in this module's code (and tests) have a look?
Comment #13
eelkeblokThe tests are failing due to #2443487. I'm setting this to "Needs review".
Comment #14
eelkeblokI'm updating the issue title to more clearly describe the problem.
Comment #15
eelkeblokSetting to 3.x so we test against the branch that has the fix for #2443487.
Comment #17
cameron prince commentedI just ran into this trying to get linkit_views working. Re-running drush updb didn't resolve it. But once linkit_views was disabled the update applied.
Comment #18
eelkeblokComment #19
gaxze commentedpatch #8 works for me.
Comment #21
anon@eelkeblok: Thanks for the patch. I have committed this now.