Jump to content

Bug or silly question? date>=today and include selector in multi language site


maba
 Share

Recommended Posts

Hi,

in a multi language site (ITA - default - and ENG for now) I have an events template (and its events.php) with its child event template (no .php file).

Events template loop all child and creates an accordion for each event.

foreach(wire('pages')->find("template=event,date_end>=today,sort=date_start,limit=20") as $event)
	$items .= _renderEvent($event);

With this I can see all events in ITA but no events in ENG.

foreach(wire('pages')->find("template=event,date_end>=today,include=all,sort=date_start,limit=20") as $event)
	$items .= _renderEvent($event);

With this I can see all events in ITA and ENG (add include=all).

foreach(wire('pages')->find("template=event,sort=date_start,limit=20") as $event)
	$items .= _renderEvent($event);

(remove date_end<=) or

foreach(wire('pages')->find("template=event,date_end<=today,sort=date_start,limit=20") as $event)
	$items .= _renderEvent($event); 

And also with this.. past events, obviously (change >= to <=).

So.. why I cannot see future events in ENG but it works in ITA? All events are active also in ENG.

Same result with superuser or guest (ProCache enabled but tried after clear cache).

Latest dev.

Thanks,

Marco

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...