Hi all,
First off I think this is one for the super SS users out there.
I am developing a site in 3.0.2 mainly in Chrome. The site code has been static for about 4 days while we content populate the site. Suddenly the homepage crashes, returning an error in the mysql query when getting a page class through DataObject. In fact all pages with db queries crashed.
Basically the query string should contain queries to the 'pageType'_Live table in the DB but during this error it only looks for the 'pageType' table. So my query filter of 'pageType'_Live.Date fails as there is no field in the query that matches this.
Now to add to the mystery, this happend only after the code was active for 4 days with 3 people using it. It only happend in Chrome, all other browsers were working fine. Every other machine in the dev team could access the home page fine. Refreshing didnt work, clearing cache didnt work, flushing=all didnt work. The only thing that solved it was restarting the browser and then everything was fine again.
If there are any ideas I am open to any suggestions. Here is the code from the homepage that queries the DB.
public function LatestNews($num=3) {
$holder = ArticleYear::get()->First();
$holder1 = RestrictedPage::get()->First();
$ds = new ArrayList();
if ($holder) {
$ds->merge(DataObject::get($obj="ArticlePage", $filter = "ArticlePage_Live.Date < curdate()"));
}
if ($holder1) {
$ds->merge(DataObject::get($obj="RestrictedPage", $filter = "RestrictedPage_Live.Date < curdate()"));
}
return ($holder || $holder1) ? $ds->sort('Date')->reverse()->limit($num) : false;
}