mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fixed Flex Pages using only default language in frontend
This commit is contained in:
parent
25f8b787b6
commit
830fa40bb7
|
|
@ -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')) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user