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.

AttachmentSize
active_translation-wdtype.patch2.72 KB

#1

ekes - July 12, 2009 - 15:42

+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...?

AttachmentSize
active_translation.499972.patch 2.71 KB

#2

drewish - July 12, 2009 - 15:49
Status:needs review» fixed

thanks, committed to HEAD and DRUPAL-6--1.

#3

System Message - July 26, 2009 - 15:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.