After installing Placement, Transaction and Token iu get this error.

* user warning: Can't create table './drupal/#sql-4011_6.frm' (errno: 150) query: ALTER TABLE `pressflow_placement` ADD CONSTRAINT `pressflow_placement_ibfk_1` FOREIGN KEY (`vid`) REFERENCES node_revisions (`vid`) ON DELETE CASCADE; in /Applications/MAMP/htdocs/drupal/includes/database.mysql.inc on line 172.
* user warning: Can't create table './drupal/#sql-4011_6.frm' (errno: 150) query: ALTER TABLE `pressflow_placement_teasers` ADD CONSTRAINT `pressflow_placement_teasers_ibfk_3` FOREIGN KEY (`vid`) REFERENCES node_revisions (`vid`) ON DELETE CASCADE, ADD CONSTRAINT `pressflow_placement_teasers_ibfk_4` FOREIGN KEY (`teaser_nid`) REFERENCES node (`nid`) ON DELETE CASCADE; in /Applications/MAMP/htdocs/drupal/includes/database.mysql.inc on line 172.
* user warning: Can't create table './drupal/#sql-4011_6.frm' (errno: 150) query: ALTER TABLE `pressflow_placement_teaser_tokens` ADD CONSTRAINT `pressflow_placement_teaser_tokens_ibfk_2` FOREIGN KEY (`teaser_nid`) REFERENCES node (`nid`) ON DELETE CASCADE, ADD CONSTRAINT `pressflow_placement_teaser_tokens_ibfk_1` FOREIGN KEY (`vid`) REFERENCES node_revisions (`vid`) ON DELETE CASCADE; in /Applications/MAMP/htdocs/drupal/includes/database.mysql.inc on line 172.

Ignoring this and adding a new placement, I get this:

Fatal error: Call to undefined method pressflow_transaction::rollback_if_false() in /Applications/MAMP/htdocs/drupal/sites/all/modules/pressflow_placement/pressflow_placement.module on line 535

Comments

david strauss’s picture

Status: Active » Fixed

The "Can't create table" error is because it's trying to set foreign keys to the {node} table, which is probably MyISAM on your site. I've added a line to the installer which will convert the {node} table to InnoDB before proceeding. I may move to the traditional deletion hook approach, but I already require InnoDB, so I may as well take advantage of referential integrity and cascading deletes.

The "Call to undefined method" was caused because I updated HEAD on the transaction module without pushing the changes back to the DRUPAL-5 branch.

Thanks for your bug reports. Tonight's snapshots should fix both of the problems, or you can update immediately to the CVS version.

david strauss’s picture

Status: Fixed » Closed (fixed)