avanzu / AdminThemeBundle

Admin Theme based on the AdminLTE Template for easy integration into symfony
MIT License
280 stars 148 forks source link

Neither the property "control_sidebar" nor one of the methods... from scratch #182

Closed glerendegui closed 7 years ago

glerendegui commented 7 years ago

I cant make this bundle work.

{% block avanzu_page_content %} {{parent()}} Hello World {% endblock %}


- No config at all
But when I load this template I get:

_Neither the property "control_sidebar" nor one of the methods "control_sidebar()", "getcontrol_sidebar()"/"iscontrol_sidebar()" or "_call()" exist and have public access in class "Avanzu\AdminThemeBundle\Helper\ContextHelper". in vendor/avanzu/admin-theme-bundle/Resources/views/layout/default-layout.html.twig at line 225

shakaran commented 7 years ago

@glerendegui thanks for your testing. I push some changes related to avanzu_admin_context params that probably should solve your issue. Could you test again with latest master?

glerendegui commented 7 years ago

The problem still remains after update. More info. The problem is around vendor/avanzu/admin-theme-bundle/Resources/views/layout/default-layout.html.twig at line 225 and 342 {% if avanzu_admin_context.control_sidebar %}

If I jump this condition with "false and", the problem changes to "Neither the property knp_menu... " at line 253 and 314: {% if avanzu_admin_context.knp_menu.enable %}

Clearly it's a problem with avanzu_admin_context properties. If I dump that I get

ContextHelper {#564 ▼
  -router: RouteAliasCollection {#556 ▼
    #cacheDir: "/path-to-my-project/code/var/cache/dev"
    #router: Router {#342 ▶}
    #routeAliases: array:1 [▶]
    #optionName: "avanzu_admin_route"
    #env: "dev"
    -debug: true
  }
  flag::STD_PROP_LIST: false
  flag::ARRAY_AS_PROPS: false
  iteratorClass: "ArrayIterator"
  storage: []
}

I haven't changed nothing at all in config files. Just composed bundle and tested template.

shakaran commented 7 years ago

@glerendegui test again with master when you can, thanks!

glerendegui commented 7 years ago

Perfect! Very thanks!

shakaran commented 7 years ago

@glerendegui glad that it was perfectly fixed to you ;) I would need a lot testing from old users and power users before to release master as stable, but your comments and issues are always welcome.

In other hand, I am not very sure if the MenuBuilder and KpnMenuBuilder is working like 1.3 releases, so any full testing and complex config or heavy uses are always welcome!