The admin/settings/actions/configure/ dialog (Admin -> Actions -> Configure) is broken because the "aid" field of the "actions" SQL table is a character type while the SQL query tries to use it as an integer type. This at least breaks with the "White Screen of Death" if Drupal is running on PostgreSQL. MySQL might be forgiving on those invalid uses, but PostgreSQL at least is strict enough here and rejects the query.

Comments

rse’s picture

StatusFileSize
new5.05 KB

Actually, Drupal 6.2 incorrectly uses the "aid" field of the "actions" table at more code locations.
I append an updated patch named "drupal-action-aid.patch" which fixes all known locations now.

damien tournoud’s picture

Version: 6.2 » 7.x-dev
Component: admin.module » system.module
Status: Active » Needs work

Because this breaks the functionality on PostgreSQL, I agree that this is a critical issue.

Thanks for the patch, but be careful: there are unrelated changes in your patch to {access}.aid (that is an integer). Marking at patch need work.

Also, because that bug is also present in the current development branch (Drupal 7.x-dev), it has to be fixed first there, and then backported. This ensure that there is no regression between versions.

catch’s picture

Also note that {access}.aid is no longer in core for D7, but that shouldn't matter since it ought to not be in the patch anyway.

rse’s picture

I had a small quoting bug left in the last patch. I've now fixed this and also tested the
patch against Drupal 6.2 under run-time and now Drupal seems to work just fine on PostgreSQL.
No more breaks seen now.

catch’s picture

This still includes hunks affecting the {access} table (leaving at needs work).

drupallfm’s picture

applied the patch in #4, in D6.2 and no more errors, it seems to work fine.

damien tournoud’s picture

Title: admin/settings/actions/configure/<nid> broken because of invalid SQL query » Makes actions PostgreSQL and ANSI compatible
Status: Needs work » Needs review
StatusFileSize
new4.62 KB

Here is a proper patch.

Test results (on PostgreSQL 8.3):

Before: Actions configuration 30 passes, 8 fails, 0 exceptions
After: Actions configuration 37 passes, 0 fails, 0 exceptions

lilou’s picture

Status: Needs review » Reviewed & tested by the community

Look good, still applied to HEAD, more tests passes so mark as RTBC.

damien tournoud’s picture

This can and should be applied to both D6 and D7, especially before we convert D7 queries to PDO.

dries’s picture

Status: Reviewed & tested by the community » Fixed

I've committed to DRUPAL-6 and CVS HEAD. Thanks rse and Damien! :)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.