Aaron Cooper

<% include 2020Navigation %> finds no template

papabear

Perhaps wrap the template name in Quotes (“)?

Aaron Cooper

Is there some sort of rule about naming include templates starting with a numeral?

Aaron Cooper
  1. Versioned::get_by_stage('TourItinerary', 'Live')->filter(['TourID' => $this->ID]);
Aaron Cooper

I seem to recall some Stage() method but can't find it

Aaron Cooper

I have a versioned dataobject called Tour attached to another dataobject in a $has_many relationship called Itineraries. In a function in the Tour object, I am getting all Itineraries:

  1. $this->Itineraries()

Works fine, however it ignores the publish state and just returns all objects. Is there a way to return only published objects?

Aaron Cooper

If everyone here can see it, it shouldn't be anything server side

Aaron Cooper

Yeah a lot of sites had the same issue. It's a common slug. They changed it pretty quickly. Small oversight.