Makes actions PostgreSQL and ANSI compatible

rse - May 23, 2008 - 08:58
Project:Drupal
Version:7.x-dev
Component:system.module
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

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.

AttachmentSizeStatusTest resultOperations
drupal-admin-action-configure.patch603 bytesIgnoredNoneNone

#1

rse - May 23, 2008 - 09:29

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.

AttachmentSizeStatusTest resultOperations
drupal-action-aid.patch5.05 KBIgnoredNoneNone

#2

Damien Tournoud - May 23, 2008 - 12:01
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.

#3

catch - May 23, 2008 - 12:54

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.

#4

rse - May 23, 2008 - 15:21

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.

AttachmentSizeStatusTest resultOperations
drupal-action-aid-v3.patch5.05 KBIgnoredNoneNone

#5

catch - May 23, 2008 - 15:29

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

#6

drupallfm - May 28, 2008 - 21:28

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

#7

Damien Tournoud - August 20, 2008 - 10:19
Title:admin/settings/actions/configure/<nid> broken because of invalid SQL query» Makes actions PostgreSQL and ANSI compatible
Status:needs work» needs review

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

AttachmentSizeStatusTest resultOperations
261859-actions-aid.patch4.62 KBIgnoredNoneNone

#8

lilou - August 24, 2008 - 03:22
Status:needs review» reviewed & tested by the community

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

#9

Damien Tournoud - August 25, 2008 - 17:49

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

#10

Dries - September 5, 2008 - 09:29
Status:reviewed & tested by the community» fixed

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

#11

Anonymous (not verified) - September 19, 2008 - 09:33
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.