[Notice] Trying to get property of non-object

GET /product/category/roofing-flooring

Line 91 in /home2/utamapag/public_html/mysite/code/ProductIndexPage.php

Source

82       $data = ProductPage::get()
83         ->where("ProductCategoryID='".$cat->ID."'")
84         ->limit($page_size, $start);
85     }
86     $url = $this->Link()."category/$category/";
87     
88     //var_dump($cat->ID);
89     
90     $this->customise(array(
91       'DataProduct' => DataObject::get('ProductPage', 'ProductCategoryID = '.$cat->ID, 'Sort ASC', ''),
92       'Title' => $cat->Title." ",
93       'MetaTitle' => $cat->Title." Category",
94     ));
95     return $this->renderWith(array(
96       'ProductIndexPage',
97       'Page'

Trace

GET /product/category/roofing-flooring

[Notice] Trying to get property of non-object

GET /product/category/roofing-flooring

Line 92 in /home2/utamapag/public_html/mysite/code/ProductIndexPage.php

Source

83         ->where("ProductCategoryID='".$cat->ID."'")
84         ->limit($page_size, $start);
85     }
86     $url = $this->Link()."category/$category/";
87     
88     //var_dump($cat->ID);
89     
90     $this->customise(array(
91       'DataProduct' => DataObject::get('ProductPage', 'ProductCategoryID = '.$cat->ID, 'Sort ASC', ''),
92       'Title' => $cat->Title." ",
93       'MetaTitle' => $cat->Title." Category",
94     ));
95     return $this->renderWith(array(
96       'ProductIndexPage',
97       'Page'
98     ));

Trace

GET /product/category/roofing-flooring

[Notice] Trying to get property of non-object

GET /product/category/roofing-flooring

Line 93 in /home2/utamapag/public_html/mysite/code/ProductIndexPage.php

Source

84         ->limit($page_size, $start);
85     }
86     $url = $this->Link()."category/$category/";
87     
88     //var_dump($cat->ID);
89     
90     $this->customise(array(
91       'DataProduct' => DataObject::get('ProductPage', 'ProductCategoryID = '.$cat->ID, 'Sort ASC', ''),
92       'Title' => $cat->Title." ",
93       'MetaTitle' => $cat->Title." Category",
94     ));
95     return $this->renderWith(array(
96       'ProductIndexPage',
97       'Page'
98     ));
99   }

Trace

GET /product/category/roofing-flooring

[User Error] Couldn't run query: SELECT DISTINCT "SiteTree_Live"."ClassName", "SiteTree_Live"."Created", "SiteTree_Live"."LastEdited", "SiteTree_Live"."URLSegment", "SiteTree_Live"."Title", "SiteTree_Live"."MenuTitle", "SiteTree_Live"."Content", "SiteTree_Live"."MetaTitle", "SiteTree_Live"."MetaDescription", "SiteTree_Live"."MetaKeywords", "SiteTree_Live"."ExtraMeta", "SiteTree_Live"."ShowInMenus", "SiteTree_Live"."ShowInSearch", "SiteTree_Live"."Sort", "SiteTree_Live"."HasBrokenFile", "SiteTree_Live"."HasBrokenLink", "SiteTree_Live"."ReportClass", "SiteTree_Live"."CanViewType", "SiteTree_Live"."CanEditType", "SiteTree_Live"."Version", "SiteTree_Live"."ParentID", "ProductPage_Live"."IsFeatured", "ProductPage_Live"."ProductCategoryID", "ProductPage_Live"."HeaderImageID", "SiteTree_Live"."ID", CASE WHEN "SiteTree_Live"."ClassName" IS NOT NULL THEN "SiteTree_Live"."ClassName" ELSE 'SiteTree' END AS "RecordClassName" FROM "SiteTree_Live" LEFT JOIN "ProductPage_Live" ON "ProductPage_Live"."ID" = "SiteTree_Live"."ID" WHERE (ProductCategoryID = ) AND ("SiteTree_Live"."ClassName" IN ('ProductPage')) ORDER BY "SiteTree_Live"."Sort" ASC You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND ("SiteTree_Live"."ClassName" IN ('ProductPage')) ORDER BY "SiteTree_Live".' at line 1

GET /product/category/roofing-flooring

Line 580 in /home2/utamapag/public_html/framework/model/MySQLDatabase.php

Source

571 	}
572 
573 	public function databaseError($msg, $errorLevel = E_USER_ERROR) {
574 		// try to extract and format query
575 		if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
576 			$formatter = new SQLFormatter();
577 			$msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
578 		}
579 
580 		user_error($msg, $errorLevel);
581 	}
582 
583 	/**
584 	 * Return a boolean type-formatted string
585 	 *
586 	 * @param array $values Contains a tokenised list of info about this data type

Trace

Category « Supplier Pagar BRC | Wiremesh | Kawat Duri | Galvalum