Jump to content

Question

Posted

I'm trying to make a custom plugin and I have the correct directory structure and filenames but the plugin does not show up in the list on /admin/settings/company/plugins/available/. Is there a log file somewhere where it loads the plugins that I can check to see what is wrong? If anybody could help me figure out how to get started in how to debug this I'd appreciate it :)

ab6fbab4c9.png

 

config.json

10 answers to this question

Recommended Posts

  • 0
Posted
  On 8/23/2016 at 9:19 PM, naja7host said:

First step , erase all file a nd let just the myplugin_plugin.php  and config.json . is the plugin available now ?

Expand  

No it still doesn't show up. I know I'm in the right directory because when I delete one of the included plugins' folders it is removed from the available list. I ran php -l on all my files and they have no syntax errors.

  • 0
Posted
  On 8/23/2016 at 10:04 PM, wreckitrandy22 said:
<?php
class MyPluginPlugin extends Plugin {
    public function __construct() {
        $this->loadConfig(dirname(__FILE__) . DS . "config.json");
    }
}
?>


 

Expand  

fgrom your class the directory should be my_plugin or you should update your files to be

 

<?php
class MypluginPlugin extends Plugin {
    public function __construct() {
        $this->loadConfig(dirname(__FILE__) . DS . "config.json");
    }
}
?>

 

  • 0
Posted
  On 8/23/2016 at 9:59 PM, naja7host said:

just to note the plugin directory should be named  myplugin .

Expand  

naja7host is right here, are you certain the plugin directory is named myplugin?

/plugins/myplugin/
/plugins/myplugin/myplugin_plugin.php
...

  • 0
Posted

I've updated the file and it still doesn't show up on the available page

60027fbe1e.PNG

 

Is there something I have to do besides refreshing to show it in the available plugins page? Or is there some config to enable developer plugins or something?

 

Edit: It appears that the permissions on the files were messed up, seems to be working now with 755

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...