Needs work
Project:
Default Filter
Version:
5.x-2.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
29 Aug 2007 at 13:59 UTC
Updated:
12 Mar 2010 at 00:10 UTC
Jump to comment: Most recent file
PostgreSQL support in Drupal 5 and many critical third-party modules is already so pervasive, that it is quite frustrating to see small and simple modules that have this homework undone, and not even any warning about incompatibility in place.
I've attached a patch that adds PostgreSQL support to .install file and fixes the module. But the actual format selection does not seem to work – I have yet to investigate if that is due to some already-reported bug.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | default_filter_2.patch | 1.24 KB | plj |
| #3 | default_filter_1.patch | 1.24 KB | plj |
| default_filter_0.patch | 2.27 KB | plj |
Comments
Comment #1
plj commentedSubmitted with wrong status; fixed.
Comment #2
dllh commentedI've applied your patch and committed to svn. Re postgres support, I'm sympathetic, but this was a quick itch-scratch module that I thought it'd be nice to contribute, and to be fair, it's still in dev, so lack of postgres support seems forgivable. Not an issue any more thanks to you, though.
Comment #3
plj commentedI did not understand that this module only supports non-CCK content types until I red #172962, and this is why it never worked for me. When I finally discovered the reason, I tried with ordinary content type and found yet another PostgreSQL bug. Since dllh already committed my previous patch (thanks for that!), I'm posting a new one that fixes only this later issue. Now it really works! (Although only with non-CCK node types.)
FYI: For PostgreSQL, CONCAT is not a native function, but one added by Drupal installer to make it accept more MySQL-ish (non-ANSI SQL) syntax. It only allows concatenation of two items, so instead of
CONCAT(format_id, '.', role_id), we need to writeCONCAT(format_id, CONCAT('.', role_id)).Comment #4
plj commentedThere was yet a junk comment that contained an old, erroneus version of the query that was fixed in the previous patch.
New patch attached.
Comment #5
davidwhthomas commentedThanks, this fixed the postgres error, but still, the default format is not selected, none are!
Comment #6
davidwhthomas commentedOk, it seems the root user bypasses the default input format and none are selected when logged in as the root user.
When logged in as a regular user, the settings work.
thanks!
DT
Comment #7
pearcec commentedWorks like a champ.
Comment #8
plj commentedThis should be applied against HEAD. There is some offset, but it still applies.
(And default_filter needs to be branched for Drupal 6.)
Comment #9
davidwhthomas commentedUnfortunately, this doesn't work in PostgreSQL 8.3
It's because it's CONCAT'ing a string and an integer, they need to be of the same datatype.
However, it's not possible to cast '.' as an integer to concat with int role_id.