Watchdog type is too long (which generates error on Postgres)
roderik - June 23, 2009 - 17:12
| Project: | Active Translation |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
The field `watchdog.type` is 16 characters. The string that is inserted is longer. As a result, there are Drupal installations everywhere with log types 'active_translati'.
...which is not that much of a disaster, but PostgreSQL is not so forgiving. If you try to cram the string "active_translation" into a varchar(16), it throws an error.
Below patch does not change the string, so the functional difference to the current module is zero -- it just fixes the Postgres error.
| Attachment | Size |
|---|---|
| active_translation-wdtype.patch | 2.72 KB |

#1
+1
Although I'll say that the use of constants for strings is generally a discouraged technique with Drupal coding - and I can't see it adds much here.
I guess retrospectively changing those active_translati or having double logging for a while as 'active_trans' isn't worth the effort for the minor addition on readability.
So just...?
#2
thanks, committed to HEAD and DRUPAL-6--1.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.