mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
BUG Fix ambiguous query for content report
This commit is contained in:
parent
cb0c00440a
commit
c331dedae9
@ -2,6 +2,7 @@
|
||||
|
||||
namespace SilverStripe\CMS\Reports;
|
||||
|
||||
use SilverStripe\CMS\Model\RedirectorPage;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Reports\Report;
|
||||
|
||||
@ -25,9 +26,10 @@ class EmptyPagesReport extends Report
|
||||
|
||||
public function sourceRecords($params = null)
|
||||
{
|
||||
return SiteTree::get()->where(
|
||||
"\"ClassName\" != 'RedirectorPage' AND (\"Content\" = '' OR \"Content\" IS NULL OR \"Content\" LIKE '<p></p>' OR \"Content\" LIKE '<p> </p>')"
|
||||
)->sort('Title');
|
||||
return SiteTree::get()
|
||||
->exclude('SiteTree.ClassName', RedirectorPage::class)
|
||||
->filter('SiteTree.Content', [null, '', '<p></p>', '<p> </p>'])
|
||||
->sort('Title');
|
||||
}
|
||||
|
||||
public function columns()
|
||||
|
Loading…
x
Reference in New Issue
Block a user