dmstr / yii2-pages-module

Application sitemap and navigation manager module for Yii 2.0 Framework
31 stars 12 forks source link

Illegal string offset 'data-page-id' exception trown #25

Closed StalkAlex closed 7 years ago

StalkAlex commented 7 years ago

I'm using '*' as access_domain value and I get exception here

At some moment this functions was called with '*' as a value of linkOption parameter. And ArrayHelper::merge is crashing as it suppose to merge two arrays, but we have string as first parameter. Can't understand what's happened. Maybe last update caused it.

StalkAlex commented 7 years ago

I think problem in backend library here

Current packagist version differ from master

echo \dmstr\widgets\Menu::widget(
    [
        'options' => ['class' => 'sidebar-menu'],
        'encodeLabels' => false,
        'items' => \yii\helpers\ArrayHelper::merge(
            ['items' => ['label' => 'Backend navigation', 'options' => ['class' => 'header']]],
            \dmstr\modules\pages\models\Tree::getMenuItems('backend', true, \dmstr\modules\pages\models\Tree::GLOBAL_ACCESS_DOMAIN)
        ),
    ]
);

Note the third parameter causing this exception in getMenyItems call. Please release next version of backend module.

schmunk42 commented 7 years ago

Just for confirmation, which version of yii2-backend-module do you have? RC4 is even with master ... https://github.com/dmstr/yii2-backend-module/releases/tag/0.7.0-rc4 If you're on stable you might not have gotten this update.

StalkAlex commented 7 years ago

Yes, we're on stable. 0.6.0 is installed now.

schmunk42 commented 7 years ago

Will create the 0.7.0 release for the backend module ASAP, in the meantime there's a 0.6.1 which forces pages to be <0.22.

Thank you for reporting!

StalkAlex commented 7 years ago

No problem, thanks!

schmunk42 commented 7 years ago

Added 0.7.0 also (same ad 0.7.0-rc4)