Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,21 @@ public function getContentObject()
{

// First, does the passed path exist in the site? If so, we consider this solved
// This is handled by the parent class
$object = parent::getContentObject();
if ($object) {
return $object;
$cPath = $this->getReference();
$site = $this->batch->getSite();
if ($cPath == '/' || $cPath == '') {
if ($site) {
return $site->getSiteHomePageObject('ACTIVE');
} else {
return Page::getByID(Page::getHomePageID(), 'ACTIVE');
}
}

$c = Page::getByPath($cPath, 'ACTIVE', $site);
if (is_object($c) && !$c->isError()) {
return $c;
}

$cPath = $this->getReference();
$entityManager = \ORM::entityManager();

// Now, let's check to see if the path matches the original path of a page in the batch
Expand Down
Loading