url_segment displays the wrong date
I have this tag:
{exp:low_events:entries channel="events" date="{segment_3}" limit="1" show_future_entries="yes"}
{title} / {event:start_date}
{/exp:low_events:entries}
Now if
segment_3
is 2015-12-02
this tag displays 2015-12-01
. Every entry after the first of december is displayed as 2015-12-01
. Every entry before is displayed correct. So why is that?
ee v2.6.1
LE: 1.4.1
php 5.5.30
Replies
Low 2 Nov 2015 12:48
I'll need to take a look myself. Please send SuperAdmin login credentials to hi at gotolow dot com if you can.
Kaspar Allenbach 2 Nov 2015 12:51
Debugg data:
Is this the right part?
Low 2 Nov 2015 12:57
What are the start/end dates for entries 338, 347 and 281?
Also, are you perhaps nesting tags here? What's the complete template code? You can use http://pastie.org/ or http://pastebin.com/ for large chunks of code.
If I have access, it'll be quicker. ;)
Low 2 Nov 2015 13:21
The clue here is in these lines of debugging code:
This means LE is getting events that span 2015-12-20, and apparently it found 3 entries: 338, 347, and 281.
Verifying these entries, I found that entry #338 had:
Start date 2015-12-01 20:00
End date 2017-03-02 00:00
End entry #347 had:
Start date 2015-12-017 20:00
End date 2016-09-05 23:00
That's the events that span multiple days. If they shouldn't, then editing them will get you the behaviour you're after.
Kaspar Allenbach 2 Nov 2015 13:23
Yeah that is the problem. There is even one date which span over several years, making all the events during that time obsolete.
Is it possible, for the sake of safety to ignore the end date completely?
Low 2 Nov 2015 13:27
As I said in the StackExchange thread:
It's not possible right now to ignore the end date of an entry. But you could force EE to look at the date that is stored in the field by using search:event="{segment_3}" on the Events tag. That will ensure that either the start date or end date matches the segment exactly.
Kaspar Allenbach 2 Nov 2015 13:38
Great. Thank you for your very fast help