diff --git a/CHANGELOG.md b/CHANGELOG.md index f314fd890..94b7907d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Support customizable null character replacement in `CSVFormatter::decode()` 1. [](#bugfix) * Fixed wrong Grav param separator when using `Route` class + * Grav 1.7: Fixed prev/next page missing pages if pagination was turned on in page header # v1.7.0-beta.9 ## 09/26/2019 diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index c3b97a0f5..357aea1a2 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -2032,7 +2032,7 @@ class Page implements PageInterface $this->path = dirname($var, 2); } - return $this->path . '/' . $this->folder . '/' . ($this->name ?: ''); + return rtrim($this->path . '/' . $this->folder . '/' . ($this->name() ?: ''), '/'); } /** @@ -2602,6 +2602,9 @@ class Page implements PageInterface throw new \InvalidArgumentException('Argument should be either header variable name or array of parameters'); } + if (!$pagination) { + $params['pagination'] = false; + } $context = [ 'pagination' => $pagination, 'self' => $this