0

I have a site with the following url:

domain.com/theater/events/2016-01-13

On said page I have this tag:

{exp:low_events:entries channel="events" date="{segment_3}" limit="1"}
   <option>{title}/ {event:start_date}</option>
{/exp:low_events:entries}

Now {event:start_date} always displays 2015-12-01 no matter what happens in the url_segment.

Why is that?

If I replace {event:start_date} with {segment_3} It shows the right date but then I'can't reformat the date. Anyone had this problem before?

--

Edit:

I further examined the problem. If I remove limit="1" then there are two entries displayed. One is the correct date and one is always the 2015-12-01. Ho can I just grab the date which matches the url_segment

1 Answer 1

1

The URL has the date in {segment_2} and you're using date="{segment_3}".

Also, if the entry/event spans multiple days, the start_date will display the event's start date, not the current date given.

Edit: Note that 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.

Edit 2: After some investigation it turned out there were events that span multiple days (years even). Correcting those entries solved the issue.

5
  • you are right. This was an error but it still displays a wrong date.
    – KSPR
    Commented Nov 2, 2015 at 11:46
  • No date spans multiple days
    – KSPR
    Commented Nov 2, 2015 at 11:53
  • I reckon the other entry spans multiple dates. If not, try and edit that entry and re-save.
    – Low
    Commented Nov 2, 2015 at 12:28
  • The entry does not span multiple dates. I re-saved the entry. It just displays 2015-12-01
    – KSPR
    Commented Nov 2, 2015 at 12:37
  • Can you open a GetSat thread to further debug this? Include your EE, LE and PHP versions, as well as Template Debugger output for all Low Events lines.
    – Low
    Commented Nov 2, 2015 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.