show_active="no" attribute does not seem to work
Hi,
In one of our websites the show_active="no" attribute does not seem to work. The site renders events which started before the current date/time. The tag looks like this:
{exp:low_events:entries channel="exhibitions" show_active="no" show_upcoming="yes" show_future_entries="yes"}
{s_exhibitions_exhibition}
{/exp:low_events:entries}
We have multiple low events fields in this channel and the main one has "Overwrite entry and expiration dates" set to Yes.
Is there anything that we can/should check? If not should I make you a username so you can have a look?
Thanks.
Replies
Low 29 Oct 2013 08:24
What do you mean with "multiple Low Events fields in this channel"? Have you added the field multiple times to a single field group so a channel entry has more than one LE field?
One thing to check is that the server time (which LE uses) is the same as your time. If in your time an event has passed, it might not have in server time.
And just to be sure; an 'active' event is an event that has a start date in the past and an end date in the future.
Stoyan Vasilev 30 Oct 2013 23:43
// What do you mean with "multiple Low Events fields in this channel"? Have you added the field multiple times to a single field group so a channel entry has more than one LE field?
We have a field called cf_events_dates and another one called cf_events_reception and then a third one called cf_events_custom. All three are low events fields.
Which PHP var in info is the server time?
Yes, this is what I mean by active.
Low 31 Oct 2013 09:02
That might be the problem. LE doesn't know which field to target. Try this:
- Open up mod.low_events.php
- Uncomment (remove double slashes on)line #206, so it reads:
- Save the file
- Add events_field="cf_events_dates" to the Entries tag
Does that help?
Low 31 Oct 2013 09:10
The server time can be seen if you echo out this in a php file:
Stoyan Vasilev 6 Nov 2013 19:44
Hi,
Uncommenting line 206 and adding the field attribute makes the template work but it introduces another problem:
When the tag in question repeats twice on the page I get this error:
When I comment out one of the instances everything works.
The template code which needs to repeat twice is:
This is on my local MAMP PRO copy and the system time is the same as my OS X time.
Low 6 Nov 2013 20:05
Yeah, that's why the line was commented out. Try and uncomment line 307 as well. That should help get that error away, while I think of a more constructive solution.
Stoyan Vasilev 6 Nov 2013 20:07
That worked. It's okay to leave it like when the site goes live?
Low 6 Nov 2013 20:44
Yeah, should be fine.
Stoyan Vasilev 6 Nov 2013 20:56
Kool. Thanks!