Problem/Motivation
The comment module depends on the node module but is missing that definition in its .info file.
This became problematic when running Simpletest tests that use the standard installation profile - that is every case that extends DrupalWebTestCase without specifying a non-standard installation profile - within a non-standard Drupal installation.
Install for example https://www.drupal.org/project/paddle, enable the Simpletest Drupal module and try to run for example the Drupal core 'Block caching' test.
You'll get
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'kanooh.simpletest237647node' doesn't exist: INSERT INTO {node_comment_statistics} (last_comment_timestamp, last_comment_uid, nid, comment_count, last_comment_name) SELECT n.created AS last_comment_timestamp, n.uid AS last_comment_uid, n.nid AS nid, 0 AS comment_count, NULL AS last_comment_name FROM {node} n LEFT OUTER JOIN {node_comment_statistics} ncs ON ncs.nid = n.nid WHERE (ncs.comment_count IS NULL ) ; Array ( ) in comment_enable() (line 48 of /Users/Sites/paddle/modules/comment/comment.install).
Proposed resolution
Define node module dependency in comment.info
User interface changes
The dependency will show up on the modules list.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#1 | node_dependency_in_comment_info_file-2376437-1.patch | 404 bytes | PieterDC |
Comments
Comment #1
PieterDCAttaching patch.
Comment #2
tstoecklerWow, it is incredibly weird that this patch applies. :-)
Thanks!
Comment #3
angel.hI tested this and it looks fine.
Comment #5
Berdirnode is a required module in D7, I'm not sure how exactly you can get this?