Hello
I am having a few problems with dates. I am using v 1.6.9.
My site lists forthcoming training courses and each instance of a course is called an event.
First problem is that events keep disappearing, without me touching the template at all. This seems to happen when I create a new event or modify an existing one. Yesterday, I found I can get some of them back, by saving again, but there are still some missing. I don’t think it’s a fault in the template. Any ideas?
Second problem is that I have some code to output the next event for each course, which works fine for some courses and not others. I have checked the course has a future event associated with it.
The code is:
{exp:weblog:entries weblog="courses" entry_id="15" disable="categories|member_data|pagination|trackbacks"}
{reverse_related_entries weblog="events" show_future_entries="yes" orderby="date" limit="1" sort="asc" disable="categories|pagination|trackbacks"}
{!-- if the event starts later than now --}
{if {entry_date format="%U"} > {current_time format="%U"} }
<div class=“next_event”>
Course next starts on _ {entry_date format="%d-%M-%Y"}
</div>
{/if}
{/reverse_related_entries}
{/exp:weblog:entries}
As I say, this works fine for some courses, so I don’t think there can be an error in the code, but am open to any ideas as to why some events are not showing up and others are! I
Thank you in advance.
Marian
PS I cannot find a relationship between the first and second problems - i.e. it is not the same events that are missing. One that has always shown up on the ‘next event’ page went missing for a week. And one that is showing up on the main events page is missing on the ‘next event’ page.