Closed Guite closed 8 years ago
I got this error while opening the extension module already
This is a generated 1.4 module? using what version of MOST? I thought there was no compatible release?
webgen. Just a try
@craigh the webgen allows always regenerating your model using the latest git version of the generator. You may read http://modulestudio.de/en/news/modulestudio-launches-service-for-web-based-generation.html for more details.
ok - please translate the error.
somehow Christian must have gotten the new Routes module, too ;-)
raw translation:
Capabilities-properties must be an arry in the format(capability => array(version => string, ... => ... in RK\InfoModule\InfoModuleVersion
$meta['capabilities'] = array(
'categorizable' => array(
'blubb' => 'RK\InfoModule\Entity\informationEntity',
),
HookUtil::SUBSCRIBER_CAPABLE => array('enabled' => true)
);
should work.
(replace "blubb" by something more.. intelligent.)
That isn't how I originally intended it. it should be
"capabilities": {
"hook_subscriber": {"enabled": true},
"searchable": {"class": "Zikula\\PagesModule\\Helper\\SearchHelper"},
"categorizable": ["Zikula\\PagesModule\\Entity\\PageEntity"],
"user": {"route": "zikulapagesmodule_user_index"},
"admin": {"route": "zikulapagesmodule_admin_index"}
},
so that there can be multiple entities in the array. e.g.
"categorizable": [
"Zikula\\PagesModule\\Entity\\PageEntity",
"Zikula\\PagesModule\\Entity\\FooEntity",
"Zikula\\PagesModule\\Entity\\BarEntity"
],
if that isn't working then there is a problem somewhere.
Capabilities must be Arrays of Arrays, this is how it is designed. Search for "capabilities must be" in the core.
Craig Heydenburg notifications@github.com schrieb am Mo., 21. Sep. 2015 01:48:
That isn't how I originally intended it. it should be
"capabilities": { "hook_subscriber": {"enabled": true}, "searchable": {"class": "Zikula\\PagesModule\\Helper\\SearchHelper"}, "categorizable": ["Zikula\\PagesModule\\Entity\\PageEntity"], "user": {"route": "zikulapagesmodule_user_index"}, "admin": {"route": "zikulapagesmodule_admin_index"} },
so that there can be multiple entities in the array. e.g.
"categorizable": [ "Zikula\\PagesModule\\Entity\\PageEntity", "Zikula\\PagesModule\\Entity\\FooEntity", "Zikula\\PagesModule\\Entity\\BarEntity" ],
if that isn't working then there is a problem somewhere.
— Reply to this email directly or view it on GitHub https://github.com/Guite/MostGenerator/issues/691#issuecomment-141845826 .
Capabilities must be Arrays of Arrays,
it IS. It just doesn't have associative keys in the final array. see below.
$meta['capabilities'] = array(
'categorizable' => array('RK\InfoModule\Entity\informationEntity'),
HookUtil::SUBSCRIBER_CAPABLE => array('enabled' => true)
);
So this would be correct?
$meta['capabilities'] = array(
'categorizable' => array(
'information' => 'RK\InfoModule\Entity\InformationEntity',
'otherEntity' => 'RK\InfoModule\Entity\OtherEntityEntity'
)
);
it IS. It just doesn't have associative keys in the final array. see below.
Ok, it must have associative keys then. See https://github.com/zikula/core/blob/master/src/lib/legacy/Zikula/AbstractVersion.php#L505-505
@guite Yes this should work.
Fixed in fa881e41c9cabbbcf0c9a635db9da3a3f851acc5
@rallek got the following error message when installing a module:
Probably caused by recent addition of
categorizable
.The corresponding code looks like this:
@cmfcmf @craigh any idea?