I had a custom CCK node type with 2 date fields - Time In and Time Out. I accidentally reversed the times and when I pulled up the Timeline view it barked at me, "Caught Exception [object Error] " in IE6 and "caught exception: TypeError: elmt has no properties" in Firefox2, and it wouldn't load anything after that.

Comments

Arto’s picture

Title: Exception if time_start is after time_end » JavaScript exception if time_start > time_end

When reporting undesired behavior, please also specify how exactly you would like that behavior changed.

In this case, it seems natural that the timeline widget might freak out if event durations have negative extent. Presumably the situation was remedied when you corrected the field ordering?

Unless otherwise specified, I would close this as "won't fix".

nisguy’s picture

If something is incorrect with the data, then perhaps some error handling.

Arto’s picture

No can do: that'd have to be inside the SIMILE code, which is not maintained as part of this Drupal module.

It would, however, be possible to have the Timeline module automatically reverse start/end dates that are in the wrong order when creating the JSON feed for the widget. However, that could be problematic since the user never sees his mistake, and it could eventually mask some other larger problem. The other option is to do nothing and close this. Opinions, anyone? Jeff?

jmiccolis’s picture

@ebrad the problem here is that by the time we can determine that the data is wrong it's too late to present a nice error message. Drupal has already loaded the page and we are just presenting JSON data to the timeline widget.

So the options are - We let the SIMILE code handle the error (present situation), we "fix" it (swap the dates) and potentially mask larger problems, or we could possible display a 'quiet' timeline that doesn't "bark" (ie is blank or ignores end data, etc).

I think the correct way here is to construct the JSON feed as described in the view and let the SIMILE code produce the error, which is what happens now.

nisguy’s picture

I'm sure ya'll know best. It's not really a problem for me, I just thought I would report it in case you wanted to do something about it. I suppose if it were a problem I could figure out a way to validate the dates in my CCK node type.

Cheers,

Brad W

jmiccolis’s picture

Version: 4.7.x-1.0 » 6.x-1.x-dev
Status: Active » Fixed

In the D6 version we're ignoring end dates that are before start dates.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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