Closed (fixed)
Project:
Table Manager
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2006 at 19:22 UTC
Updated:
30 Aug 2006 at 08:11 UTC
Table manager displays a bogus date for date fields that are empty. Attached is a suggestion for fixing this.
| Comment | File | Size | Author |
|---|---|---|---|
| tablemanager.module.patch | 744 bytes | bitjungle |
Comments
Comment #1
pobster commentedMmmmm okay, yes point taken... But how can the date field ever be empty? There's no blank option? And if it really is blank then the code skirts around not displaying anything anyway? I don't understand why you'd have any need for this patch? I'll obviously include it if you can give me a situation where it's necessary?
Pobster
Comment #2
bitjungle commentedWell, I got the empty entries by importing a csv file. And I really want some fields empty in this case. The table in question is a results table for a competition, where the five best results for each competitor counts in the final sum. The date for which a specific result was obtained, is also displayed. Some of the comptetitors does not have five qualifying results yet, so some fields needs to be empty. My table is here.
Comment #3
pobster commentedWell I can't view your page as you've not set permissions for anonymous users to view tables...
But again, if a date field is empty then it'll be skipped and a completely empty cell will be displayed? You've still not convinced me here you know ;o) It'll only display garbage if garbage is fed to it??? If nothing is fed to it then it will DISPLAY NOTHING!!! For cvs import you do realise that you can literally type:
an entry,another entry,,see the empty entry before this one?
Pobster
Comment #4
pobster commentedFrom your 'patch':
if (strlen(trim($a)) > 3) {See? This means you're only allowing entries which are over 3 characters long... Why are you entering those 3 characters at all? There's your garbage! Don't do it and it won't happen ;o)
Pobster
Comment #5
pobster commentedOkay look... I've just 'tested' csv import with a date field and indeed when you enter nothing, then NOTHING gets displayed...
...*sigh* it isn't a bug when you're just doing it wrong you know...
Pobster
Comment #6
pobster commentedComment #7
pobster commented