Home > other >  After use yii2 - admin integration rbac background, routing the route is always first visit to displ
After use yii2 - admin integration rbac background, routing the route is always first visit to displ

Time:10-08

Downloaded mdmsoft/yii2 - admin privileges system bag,
But routing the route list page load for the first time always appear on the display error
,
Must be the second load will be normal
Configuration files, and calls have not changed, the direct reference packagist
Call is no cache, will into the cache, Mr Page will display an error, however, the second time to refresh when already generated cache to normal  , also can't change, things too much, please be aware of or used yii2 - admin people teach
Because of problems have been solved, packagist package, so the initialization routing load time to switch to the asynchronous ajax way, each time to refresh the routing list, in addition to the cache feature

CodePudding user response:

Check your code is there call \ Yii: : $app - & gt; The response - & gt; Format=\ yii \ web \ Response: : FORMAT_JSON, specify the output format, and in the init method invocation, in obtaining all routing, will correspond to the output, from the original format to json output, so the printing, in the rules after the cache out again, don't go the class declaration, will not be printed, so \ yii: : $app - & gt; The response - & gt; Format=\ yii \ web \ Response: : FORMAT_JSON code to use need to be careful,
  • Related