Fixed copying page without changing the slug

This commit is contained in:
Matias Griese
2021-05-10 11:43:16 +03:00
parent 1a28155f1c
commit d058c1d4fc
2 changed files with 3 additions and 1 deletions

View File

@@ -5,8 +5,9 @@
* Allow optional start date in page collections [#3350](https://github.com/getgrav/grav/pull/3350)
1. [](#bugfix)
* Fixed twig deprecated TwigFilter messages [#3348](https://github.com/getgrav/grav/issues/3348)
* Fixed fatal error with some markdown links [grav-premium-issues#95](https://github.com/getgrav/grav-premium-issues/issues/95)
* Fixed fatal error with some markdown links [getgrav/grav-premium-issues#95](https://github.com/getgrav/grav-premium-issues/issues/95)
* Fixed markdown media operations not working when using `image://` stream [#3333](https://github.com/getgrav/grav/issues/3333) [#3349](https://github.com/getgrav/grav/issues/3349)
* Fixed copying page without changing the slug [getgrav/grav-plugin-admin#2135](https://github.com/getgrav/grav-plugin-admin/issues/2139)
# v1.7.14
## 04/29/2021

View File

@@ -322,6 +322,7 @@ trait PageLegacyTrait
$parentKey = $parent ? $parent->getKey() : '';
if ($this instanceof FlexPageObject) {
$key = trim($parentKey . '/' . $this->folder(), '/');
$key = preg_replace(static::PAGE_ORDER_PREFIX_REGEX, '', $key);
} else {
$key = trim($parentKey . '/' . basename($this->getKey()), '/');
}