Skip to content

Commit

Permalink
Bug fixes with URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
aembler committed Jan 23, 2017
1 parent e7f09e9 commit 1841a87
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
14 changes: 8 additions & 6 deletions concrete/controllers/panel/detail/page/location.php
Expand Up @@ -125,13 +125,15 @@ public function submit()

if (is_array($pathArray)) {
foreach ($pathArray as $i => $path) {
$p = new PagePath();
$p->setPagePath($path);
$p->setPageObject($this->page);
if ($canonical == $i) {
$p->setPagePathIsCanonical(true);
if ($path) {
$p = new PagePath();
$p->setPagePath($path);
$p->setPageObject($this->page);
if ($canonical == $i) {
$p->setPagePathIsCanonical(true);
}
\ORM::entityManager()->persist($p);
}
\ORM::entityManager()->persist($p);
}
}

Expand Down
3 changes: 3 additions & 0 deletions concrete/src/Page/Page.php
Expand Up @@ -2636,6 +2636,9 @@ public function generatePagePath()
} else {
$pathString = $this->computeCanonicalPagePath();
}
if (!$pathString) {
return ''; // We are allowed to pass in a blank path in the event of the home page being scanned.
}
// ensure that the path is unique
$suffix = 0;
$cID = ($this->getCollectionPointerOriginalID() > 0) ? $this->getCollectionPointerOriginalID() : $this->cID;
Expand Down

2 comments on commit 1841a87

@KorvinSzanto
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any plan on how to fix sites effected by this?

@aembler
Copy link
Member Author

@aembler aembler commented on 1841a87 Jan 23, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.