spiffy-navigation icon indicating copy to clipboard operation
spiffy-navigation copied to clipboard

paramsAreEquals() in Service\Navigation notice

Open yourithielen opened this issue 11 years ago • 2 comments

The $routeParams indexes__CONTROLLER__ and NAMESPACE are not available when adding pages to a container, this generates a notice and makes menu item inactive while it should be active.

yourithielen avatar Oct 09 '13 11:10 yourithielen

I'm facing this issue too when trying to add a menu item with route params. Am I misusing the params key?

config:

array(
    'options' => array(
        'route' => 'cf_reports',
        'params' => array(
            'action' => 'new',
        ),
        'label' => 'New project',
    ),
    'attributes' => array(
        'name' => 'New project',
    )
),

bgallagher avatar Feb 10 '14 15:02 bgallagher

FWIW - to get this to work properly, I had to:

  • Add a '__NAMESPACE__' to my route's 'defaults' rather than a fully qualified 'controller'.
  • Truncate the namespace from my 'default' 'controller'.
  • Add the 'controller' key to my menu item's 'param' key without the namespace.

Might help someone in future...

bgallagher avatar Feb 10 '14 17:02 bgallagher