When
- replacing a core module (say translation) in sites/all/modules/translation
- running a test that uses the testing profile (i.e., not standard profile)
then the initial setup of the testing environment fails with the following error(s):
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /batch?id=96&op=do
StatusText: Service unavailable (with message)
ResponseText:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'modules/translation/translation.module' for key 1: UPDATE {system} SET info=:db_update_placeholder_0, filename=:db_update_placeholder_1
WHERE (filename = :db_condition_placeholder_0) ; Array
(
[:db_update_placeholder_0] => a:9:{s:4:"name";s:19:"Content translation";s:11:"description";s:57:"Allows content to be translated into different languages.";s:12:"dependencies";a:1:{i:0;s:6:"locale";}s:7:"package";s:4:"Core";s:7:"version";s:7:"7.0-dev";s:4:"core";s:3:"7.x";s:5:"files";a:3:{i:0;s:18:"translation.module";i:1;s:21:"translation.pages.inc";i:2;s:16:"translation.test";}s:3:"php";s:5:"5.2.4";s:9:"bootstrap";i:0;}
[:db_update_placeholder_1] => modules/translation/translation.module
[:db_condition_placeholder_0] => sites/all/modules/translation-HEAD/translation.module
)
in system_update_files_database() (line 2300 of modules\system\system.module).
Uncaught exception thrown in session handler.PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null: INSERT INTO {sessions} (sid, ssid, uid, cache, hostname, session, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array
(
[:db_insert_placeholder_0] => rnJS2LjZUwBf07hNTAI7I-xjTvQmdlfUVJSmUfxdOJY
[:db_insert_placeholder_1] =>
[:db_insert_placeholder_2] =>
[:db_insert_placeholder_3] => 0
[:db_insert_placeholder_4] => 192.168.0.2
[:db_insert_placeholder_5] => batches|a:95:{i:1;b:1;...}}
[:db_insert_placeholder_6] => 1291149784
)
in _drupal_session_write() (line 204 of includes\session.inc).
Attached patch should hopefully prove that -- it merely copies the entire translation module into sites/all/modules.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | drupal.registry.3.patch | 2.13 KB | sun |
| #2 | drupal.registry.1.patch | 2.22 KB | sun |
| drupal.registry.0.patch | 45.16 KB | sun |
Comments
Comment #1
sunActual Translation module files are irrelevant; removed them.
Added potential fix + @todo to system_update_files_database(). I've the impression that we need to fix the @todo instead.
Comment #2
sunComment #3
sunAttached patch makes it work again, but is a regression to #938560: {system} records of installed modules are removed
Comment #4
sunThat said, I have no idea why this only happens when running tests using the testing profile...?
Comment #6
David_Rothstein commentedSubscribing.
Comment #7
sunComment #8
sunThis is unrelated to overriding core modules. Testing profile also fails without that.
Comment #9
sun#999072: drupal_system_listing() returns items keyed by 'uri' instead of 'name' when using testing profile contains very interesting additional pointers
Comment #10
sunAforementioned issue fixed this bug.