paulgrafx
I have errors appearing when tags and categories not found so I have added a forced 404 error page.
So in the 'components/BlogList.php' starting at around line 263 -> 'return $this->controller->run('404');'
if ($this->property('filter_type') == 'category'){
$category_name = $this->property('filter_value');
$category = CategoryModel::where('slug', '=', $category_name)->first();
if($category){
$catID = $category->id;
}else{
$catID = '#';
return $this->controller->run('404');
}
$BlogPosts->filterByCategory($catID);
}
if ($this->property('filter_type') == 'tag'){
$tag = TagModel::where('slug', '=', $this->property('filter_value'))->first();
if($tag){
return $tag->posts()->paginate($this->property('postsPerPage'));
} else {
return $this->controller->run('404');
}
}
paulgrafx
Hi ChadStrat,
Please can the above be fixed. I am getting 500 errors listed when they are actual 404's.
Last updated
1-2 of 2