There is a bug in the maintenance mode.
ZhiweiWu0425 opened this issue · comments
We can confirm that the maintenance mode is working with pages generated using this pages plugin. Note, if you are signed in as an administrator, then maintenance mode will not have any effect. Administrators can navigate the website when maintenance mode is turned on.
If this is still an issue, please provide step-by-step replication instructions on how to arrive at the problem.
I hope this helps.
I understand what you said
But if the maintenance mode is enabled, ExtraData should not be added to the interface, and the maintenance interface should only display Pages/xx.htm set by the maintenance mode
I tried to add some code in RainLab\Pages\Components\StaticPage, which achieved the effect I said
I wonder if you understand what I mean
/**
* Find foreign view bag values and add them to
* the component and page vars.
*/
protected function defineExtraData()
{
/*
* Maintenance mode
*/
if (
MaintenanceSetting::isConfigured() &&
MaintenanceSetting::get('is_enabled', false) &&
!BackendAuth::getUser()
) {
/*
* If the maintenance mode is enabled, ExtraData should not be added to the interface,
* and the maintenance interface should only display Pages/xx.htm
*/
return true;
}
....
return $extraData;
}
original
您说的我都明白
但是如果开启维护模式,不应吧ExtraData添加到界面,维护界面只应显示 维护模式设置的Pages/xx.htm
我在RainLab\Pages\Components\StaticPage中尝试加入了一些代码,达到我说的效果了
不知您是否理解我表达的意思
Thank you for handling this issue quickly, everything is normal now, great! !