We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When dynamic_page_visibility: is set to true Grav throws a critical error:
dynamic_page_visibility:
true
grav.CRITICAL: Call to a member function header() on null
Full log included: error.last.log
The text was updated successfully, but these errors were encountered:
Still happens on Admin v1.10-rc.6 & Grav v1.7.0-rc.6
Any chance for this function to work in 1.7? Log below.
public function pageVisibility(Event $e) { if ($this->config->get('plugins.login.dynamic_page_visibility')) { /** @var Pages $pages */ $pages = $e['pages']; $user = $this->grav['user']; foreach ($pages->instances() as $page) { $header = $page->header(); if (isset($header) && isset($header->access) && isset($header->login['visibility_requires_access']) && $header->login['visibility_requires_access'] === true) { $config = $this->mergeConfig($page); $access = $this->login->isUserAuthorizedForPage($user, $page, $config); if ($access === false) { $page->visible(false); } } } } }
Sorry, something went wrong.
It looks like $pages->instances() returns null as some page. Look for a broken page.
$pages->instances()
Fixed Pages::instances() returning null values when using `Flex Pag…
Pages::instances()
01b0b16
…es` [#2889]
@MakaryGo Could you test with latest Grav CI build if your issue is fixed? We're going to do release maybe tomorrow.
Thanks!
mahagr
No branches or pull requests
When
dynamic_page_visibility:
is set totrue
Grav throws a critical error:Full log included:
error.last.log
The text was updated successfully, but these errors were encountered: