I have my own created plugin after update to OC3 framework doesnt see my plugin
when i set app_debug=true i see in logs: Plugin mkinternet\cms\Plugin could not be instantiated.
when i ser app_debug=false no error in logs appear
my other plugins works
plugin.yaml exist
php artisan plugin:install Mkinternet.Cms returns "Package not found
php artisan plugin:enable Mkinternet.Cms returns [ERROR] Unable to find plugin ‘Mkinternet.Cms’
php artisan create:plugin Mkinternet.Cms returns
Process halted! This file already exists: \xxx\public_html\plugins/mkinternet/cms/Plugin.php
I found the problem.
In registerNavigation() definend array had missed coma.
I wonder why Octobercms didn’t return syntax error here:
public function registerNavigation(){
return [
'cms' => [
'label' => 'CMS ',
'url' => Backend::url('mkinternet/cms/url'),
'icon' => 'icon-car',
'order' => 520,
'roles' => ['developer'] //missed coma
'sideMenu' => []
],
];
}
I checked int boot() and i also cannot produce syntax error backtrace.
snipi
November 18, 2024, 1:27pm
#4
by default, invalid plugin may not break whole cms, right? that’s why plugin is not loaded, or is loaded but not showing in navigation… thats correct behaviour