You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just started experimenting with Grav on 1.7.17 about a week ago, then upgraded to 1.7.18 the other day and started getting an error when I clicked the blue Configuration button of the Pages admin interface. I'm just using my localhost setup of Apache 2.4.48, PHP 8.0.8 on Manjaro Linux. The error is:
TypeError
Grav\Framework\Flex\FlexDirectory::loadDirectoryConfig(): Return value must be of type array, null returned
I tried a completely fresh installation of 1.7.18 with no additional plugins, content, or customizations and got the same thing. Then investigating some more, it showed the following:
/srv/http/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php
}
/**
* @param string $name
* @return array
* @internal
*/
public function loadDirectoryConfig(string $name): array
{
$grav = Grav::instance();
/** @var UniformResourceLocator $locator */
$locator = $grav['locator'];
$uri = $this->getDirectoryConfigUri($name);
// If configuration is found in main configuration, use it.
if (str_starts_with($uri, 'config://')) {
$path = strtr(substr($uri, 9, -5), '/', '.');
return $grav['config']->get($path);
}
// Load the configuration file.
$filename = $locator->findResource($uri, true);
if ($filename === false) {
return [];
}
$file = YamlFile::instance($filename);
return $file->content();
}
/**
* @param string|null $name
* @return string
*/
public function getDirectoryConfigUri(string $name = null): string
{
$name = $name ?: $this->getFlexType();
Arguments
"Grav\Framework\Flex\FlexDirectory::loadDirectoryConfig(): Return value must be of type array, null returned"
I'm new to this so not sure really what is happening however based on that message I did an experiment and reverted the FlexDirectory.php file to the one from version 1.7.17. All seems to work fine again. Note: I also noticed this issue with the Configuration tab in the Accounts section of the admin interface.
I hope this helps.
The text was updated successfully, but these errors were encountered:
I just started experimenting with Grav on 1.7.17 about a week ago, then upgraded to 1.7.18 the other day and started getting an error when I clicked the blue Configuration button of the Pages admin interface. I'm just using my localhost setup of Apache 2.4.48, PHP 8.0.8 on Manjaro Linux. The error is:
I tried a completely fresh installation of 1.7.18 with no additional plugins, content, or customizations and got the same thing. Then investigating some more, it showed the following:
I'm new to this so not sure really what is happening however based on that message I did an experiment and reverted the FlexDirectory.php file to the one from version 1.7.17. All seems to work fine again. Note: I also noticed this issue with the Configuration tab in the Accounts section of the admin interface.
I hope this helps.
The text was updated successfully, but these errors were encountered: