mirror of
https://github.com/getgrav/grav.git
synced 2026-01-24 16:30:11 +01:00
Fixed Flex Pages using only default language in frontend
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
1. [](#bugfix)
|
||||
* Fixed CLI progressbar in `backup` and `security` commands to use styled output [#3198](https://github.com/getgrav/grav/issues/3198)
|
||||
* Fixed page save failing because of uploaded images [#3191](https://github.com/getgrav/grav/issues/3191)
|
||||
* Fixed `Flex Pages` using only default language in frontend [#106](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/106)
|
||||
|
||||
# v1.7.5
|
||||
## 02/01/2021
|
||||
|
||||
@@ -759,6 +759,12 @@ class Pages
|
||||
|
||||
$instance = $this->index[$path] ?? null;
|
||||
if (is_string($instance)) {
|
||||
/** @var Language $language */
|
||||
$language = $this->grav['language'];
|
||||
$lang = $language->getActive();
|
||||
if ($lang) {
|
||||
$instance .= ':' . $lang;
|
||||
}
|
||||
$instance = $this->directory ? $this->directory->getObject($instance, 'flex_key') : null;
|
||||
if ($instance) {
|
||||
if ($this->fire_events && method_exists($instance, 'initialize')) {
|
||||
|
||||
Reference in New Issue
Block a user