Closed (fixed)
Project:
Phone
Version:
6.x-2.7
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jun 2008 at 18:45 UTC
Updated:
9 Sep 2009 at 16:20 UTC
Jump to comment: Most recent file
This patch fixes the fact that empty rows are stored in the database when multi-field is chosen. If only one phone number is given, it is stored with an additional 2 blank fields. This is even more important if you include the patch to allow the user to select number of fields in the multi-field ( http://drupal.org/node/275837 ) - they could have up to nine blank fields then.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | phone_275843.patch | 565 bytes | drewish |
| phone.module.blank_.data_.diff | 714 bytes | liveoutloud2day |
Comments
Comment #1
aren cambre commentedThis is still happening in 6.x. Changing to active since new patch is needed.
"Critical" because this is causing major data nastiness and wreaks havoc on views containing nodes with Phone (CCK) fields.
Comment #2
izarco commentedI solved the problem by changing the hook_content_is_empty
from:
function phone_content_is_empty($item, $field) {
return FALSE;
}
to:
function phone_content_is_empty($item, $field) {
if (empty($item['value'])) {
return TRUE;
}
return FALSE;
}
Comment #3
drewish commentedesezako's suggestion is the correct solution at least as far as CCK on D6 goes. Attached is a patch with the changes.
Comment #4
thierry_gd commentedTaken into account in 6.2.9 version