Brand new Drupal 6.10 install, unpack Rules 6.x-1.x-dev 2009-Apr-11 and enable. Following errors seen:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE name = 'rules_example_1'' at line 1 query: DELETE FROM WHERE name = 'rules_example_1' in /Applications/MAMP/htdocs/drupal-6.10/sites/all/modules/rules/rules/rules.module on line 774.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(name, data) VALUES ('rules_example_1', 'a:8:{s:5:\"#type\";s:4:\"rule\";s:4:\"#' at line 1 query: INSERT INTO (name, data) VALUES ('rules_example_1', 'a:8:{s:5:\"#type\";s:4:\"rule\";s:4:\"#set\";s:15:\"event_node_view\";s:6:\"#label\";s:59:\"Example rule: When viewing an unpublished page, publish it.\";s:7:\"#status\";s:6:\"custom\";s:11:\"#categories\";a:1:{i:0;s:7:\"example\";}s:7:\"#active\";i:0;s:11:\"#conditions\";a:2:{i:0;a:4:{s:5:\"#type\";s:9:\"condition\";s:5:\"#name\";s:36:\"rules_condition_content_is_published\";s:9:\"#settings\";a:1:{s:13:\"#argument map\";a:1:{s:4:\"node\";s:4:\"node\";}}s:7:\"#negate\";i:1;}i:1;a:3:{s:5:\"#type\";s:9:\"condition\";s:5:\"#name\";s:31:\"rules_condition_content_is_type\";s:9:\"#settings\";a:2:{s:13:\"#argument map\";a:1:{s:4:\"node\";s:4:\"node\";}s:4:\"type\";a:1:{i:0;s:4:\"page\";}}}}s:8:\"#actions\";a:1:{i:0;a:3:{s:5:\"#type\";s:6:\"action\";s:5:\"#name\";s:30:\"rules_core_node_publish_action\";s:9:\"#settings\";a:2:{s:13:\"#argument map\";a:1:{s:4:\"node\";s:4:\"node\";}s:9:\"auto_save\";b:1;}}}}') in /Applications/MAMP/htdocs/drupal-6.10/sites/all/modules/rules/rules/rules.module on line 775.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE name = 'rules_set_1'' at line 1 query: DELETE FROM WHERE name = 'rules_set_1' in /Applications/MAMP/htdocs/drupal-6.10/sites/all/modules/rules/rules/rules.module on line 774.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(name, data) VALUES ('rules_set_1', 'a:4:{s:5:\"label\";s:44:\"Example: Empty ru' at line 1 query: INSERT INTO (name, data) VALUES ('rules_set_1', 'a:4:{s:5:\"label\";s:44:\"Example: Empty rule set working with content\";s:9:\"arguments\";a:1:{s:4:\"node\";a:2:{s:4:\"type\";s:4:\"node\";s:5:\"label\";s:7:\"Content\";}}s:10:\"categories\";a:1:{i:0;s:7:\"example\";}s:6:\"status\";s:6:\"custom\";}') in /Applications/MAMP/htdocs/drupal-6.10/sites/all/modules/rules/rules/rules.module on line 775.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | rules.admin-install.patch | 1.03 KB | lyricnz |
Comments
Comment #1
lyricnz commentedNote: the install above only does this when attempting to install both "Rules" and "Rules Administration UI" at the same time. It seems that the code in the latter is making some assumptions about the state of the system.
Comment #2
lyricnz commentedThis is caused by the change applied in http://drupal.org/cvs?commit=190672 intended to fix #300729: Investigate default/example rules & rule set installation type. The problem is that the "fake" rules_item_info doesn't contain $info['db_table'].
Note: in order to be able to test this properly, you need to delete from {system}, since Rules Administration UI doesn't support uninstallation.
Comment #3
lyricnz commentedI think the problem is just that rules_get_items() is not checking $key when it uses rules_rules_item_info() to get the information. See attached patch.
Comment #4
fagooh, indeed - committed. Thanks for catching this one!
Comment #6
mitchell commentedUpdated component.