Fixed flex pages using wrong type in onBlueprintCreated event [#3157]

This commit is contained in:
Matias Griese
2021-05-27 14:18:12 +03:00
parent e28360f86a
commit 278671deec
2 changed files with 3 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
* Fixed `pathinfo()` twig filter in PHP7
* Fixed the first visible child page getting ordering number `999999.` [#3365](https://github.com/getgrav/grav/issues/3365)
* Fixed flex pages search using only folder name [#3316](https://github.com/getgrav/grav/issues/3316)
* Fixed flex pages using wrong type in `onBlueprintCreated` event [#3157](https://github.com/getgrav/grav/issues/3157)
# v1.7.15
## 05/19/2021

View File

@@ -502,6 +502,8 @@ class PageObject extends FlexPageObject
if ($isNew === true && $name === '') {
// Support onBlueprintCreated event just like in Pages::blueprints($template)
$blueprint->set('initialized', true);
$blueprint->setFilename($template);
Grav::instance()->fireEvent('onBlueprintCreated', new Event(['blueprint' => $blueprint, 'type' => $template]));
}