Something changed in 2021.07
Suddenly I got
"error
class “text-danger”
type “Error”
description “…\vendor\php-di\php-di\src\Container.php(381): Circular dependency detected while trying to resolve entry ‘security’”
And I’d already tried to solve it uninstalling php-di and reinstalling it again… but still.I’m use $this->field->ReadOnly on Page_Load server event… setting it up in Fields didn’t worked sometimes.
When I’m trying to set defaults values that are defined in Page_Load too.
I found the error…
I did clone entirely my project, with and oldest version that work properly, and start making last changes again, one by one.
And found a Table Specific Client Script, referring to a renamed field…
And seems to be fixed…
I’d Logged out to change profile and try with a normal user instead of Admin.
And the error showed up again.So, the error appears on log out…
You may enable debug and check the log file, trace how the error occurred.
Seems solved now, thanks.apparently it was a
if (IsAdmin()) {
}
in
Server Events
- Global → All Pages → UserLevel_Loaded.
Since UserLevel_Loaded server event is fired during the creation of the security object, you should use the method of the Advanced Security class, i.e. $this->isAdmin(). (According to the source code of v2020, although it would not raise error, it did not return the correct result because it only check if the user is the hard-coded administrator if security object was not created yet.)