Table manager displays a bogus date for date fields that are empty. Attached is a suggestion for fixing this.

CommentFileSizeAuthor
tablemanager.module.patch744 bytesbitjungle

Comments

pobster’s picture

Mmmmm 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

bitjungle’s picture

Well, 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.

pobster’s picture

Well 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

pobster’s picture

From 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

pobster’s picture

Okay 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

pobster’s picture

Status: Needs review » Closed (won't fix)
pobster’s picture

Status: Closed (won't fix) » Closed (fixed)