All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

url_segment displays the wrong date

Kaspar Allenbach 2 Nov 2015 12:45 problem, rejected

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

  1. 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.

  2. Kaspar Allenbach 2 Nov 2015 12:51

    Debugg data:

     
    (0.100850 / 3.51MB) Parsing Tags in Template
    (0.100888 / 3.52MB) Tag: {exp:low_events:entries channel="spieldaten" date="2015-12-20" show_passed="no" show_active="yes" show_future_entries="yes"}
    (0.100989 / 3.52MB) Closing Tag Found
    (0.101083 / 3.52MB) Tag: {exp:low_events:entries channel="spieldaten" show_passed="no" show_active="no" limit="200"}
    (0.101174 / 3.52MB) Closing Tag Found
    (0.101282 / 3.53MB) Tag: {exp:channel:entries channel="reservieren" disable="categories|member_data|pagination"}
    (0.101361 / 3.52MB) Closing Tag Found
    (0.101421 / 3.53MB) Processing Tags
    (0.101457 / 3.53MB) Module Tag: Low_events/entries
    (0.101480 / 3.53MB) Module Tag: Low_events/entries
    (0.101499 / 3.53MB) Module Tag: Channel/entries
    (0.101515 / 3.53MB) Including Files for Plugins and Modules
    (0.101779 / 3.55MB) Files for Plugins and Modules All Included
    (0.101798 / 3.55MB) Beginning Final Tag Data Processing
    (0.101814 / 3.55MB) Calling Class/Method: Low_events/entries
    (0.102016 / 3.55MB) -> Class Called: Low_events
    (0.102991 / 3.59MB) -> Method Called: entries
    (0.103144 / 3.60MB) Low Events: Working date set to 2015-12-20 13:49
    (0.103191 / 3.60MB) Low Events: Unit: day
    (0.105265 / 3.61MB) Low Events: Setting fixed_order="338|347|281"
    (0.105330 / 3.61MB) Low Events: Calling the channel module
    (0.111567 / 3.84MB) Calling Extension Class/Method: Matrix_ext/channel_entries_tagdata
    (0.113494 / 3.90MB) Calling Extension Class/Method: Matrix_ext/channel_entries_tagdata
    (0.115130 / 3.90MB) Calling Extension Class/Method: Matrix_ext/channel_entries_tagdata
    (0.117558 / 3.63MB) -> Data Returned
    (0.117615 / 3.63MB) Calling Class/Method: Low_events/entries
    (0.118042 / 3.63MB) -> Class Called: Low_events
    (0.118185 / 3.63MB) -> Method Called: entries
    (0.118297 / 3.63MB) Low Events: Working date set to 2015-11-02 13:49
    (0.118345 / 3.63MB) Low Events: Unit: upcoming
    (0.120726 / 3.76MB) Low Events: Setting fixed_order="261|262|263|264|265|266|345|267|346|335|268|269|333|270|336|337|271|272|338|273|339|274|275|340|276|342|277|279|344|278|347|366|280|281|367|282|283|284|368|285|369|370|286|287|289|290|291|292|293|294|257|295|296|297|331|299|300|301|302|303|304|305|306|307|309|310|311|312|313|314|315|316|317|318|319|320|332|321|322|323|324|325|326|327|328|329|330"
    (0.120781 / 3.76MB) Low Events: Calling the channel module


    Is this the right part?

  3. 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. ;)

  4. Low 2 Nov 2015 13:21

    The clue here is in these lines of debugging code:

    Low Events: Working date set to 2015-12-20 13:49 
    Low Events: Unit: day
    Low Events: Setting fixed_order="338|347|281"


    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.

  5. 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?

  6. Low 2 Nov 2015 13:27

    As I said in the StackExchange thread:

    Using date="..." is specifically designed to display events according to a date range. Using date="2016-01-13" will display all events that are active on January 13th 2015. This includes events that start that day, that end that day and that are active during that day (start before and end after).

    If you're after displaying a single entry/event, you can also just use the channel:entries tag like you would with any old single entry, and use the entry's url_title to determine which entry/event you want to show.


    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.

  7. Kaspar Allenbach 2 Nov 2015 13:38

    Great. Thank you for your very fast help