Hi there!
I have many date fields that doesn´t have "to" date. They have just one date, the initial one. Those fields work and should be shown, the same way as the "posted" date.
But in those cases, they are shown twice.
In example: Field "Last day you´ve aten tomatoes", on 10/01/2009
And instead of be shown like 10/01/2009, it shows like 10/01/2009 - 10/01/2009.
I´ve marked this as a bug, because those fields were shown and existed long before I´ve updated to the latest release, and now, they are not shown as they should anymore.
Thanks for your help!
Rosamunda
Comments
Comment #1
choster commentedMarked #593920: my date keep showing end date even i choose to never option as a duplicate.
Comment #2
mattez commentedSame issue. *** partially fixed ***
In date field setup:
To Date > "Never"
Output on page (from Devel Themer):
function used: theme_date_display_range();
Variables:
Problem:
IMHO combination od BUG & USING DEVEL THEMER!! Disable it and works fine.
Why?
in date.theme:
empty($date2) = is not empty!! - should be!!
$date1 == $date2 is not equal, thanks to DEVEL THEMER which is adding s with unique ID
I'm not programmer, but there is probably problem with saving data to DB - $date2 should be empty. Some more advanced homeboy should try check it,... Thanx ;)
Comment #3
ekes commentedWell switching devel themer off does solve it.
And it's not in the DB. So it's an assumption made at one point (date) or other (devel themer) on display. Does the theme function get the original date as well as the date strings to be displayed? ie could they be compared?
Comment #4
gianni.s commentedHi guys,
same issue using a Datetime field and I found a relationship with the "time" part of the same "from" field.
I have no "to date" field and I use the initial date only, and:
- when I leave the time part blank (or set it to 00:00), I see: 10 Feb 2010 (Tutto il giorno)
- when I set the time part (by any value except 00:00), I see: 10 Feb 2010 - 12:00
If the italian "Tutto il giorno" means 10 Feb 2010 - 10 Feb 2010, it seems that time part in the initial date is related to the "to date" information storing or displaying function.
Gianni
Comment #5
bluestarstudios commentedI've found a similar problem. using the "c" handler to display the ISO format displays it twice. (#736828: ISO 8601 "c" displays duplicate)
2010-03-17T04:58:58-04:00 2010-03-17T04:58:58-04:00However when I changed the format handler to "Y-m-d\TH:i:sP" it displays the following thing:
2010-03-17T04:58:58-04:00 -04:00So it seems like the timezone element is trying to add itself to a "to date" item whether it exists or not?
Please lets get this fixed...
Comment #7
robbertnl commentedSame issue, but disabling devel themer works here as well. So it's an issue only when using devel themer i think
Comment #8
arlinsandbulte commentedThe problem is that the date theme layer checks to see if the From and To date is equal. If they are equal, the date theme layer only outputs the From date.
#2 is exactly correct. Devel theme module adds some stuff to the From date and To date, which makes these values not equal when they should be.
Comment #9
coleman.sean.c commented@bluestar: For what it's worth, that behavior is set by
theme_date_display_single(), which is a themeable function. You can copy it fromdate.theme, remove the references to$timezone, and save the modified version in yourtemplate.phpfile asmythemename_date_display_single().Comment #10
martin.l commentedsubscribing.
Comment #11
bjmiller121 commentedI came up with a similar solution to #9, but using
template_preprocess_date_display_single()instead.See: https://www.drupal.org/node/736828#comment-8992119
Comment #12
damienmckennaUnfortunately the Drupal 6 version of the Date module is no longer supported. That said, we appreciate that you took time to work on this issue. Should this request still be relevant for Drupal 7 please feel free to reopen it. Thank you.