This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

jondeaves
jondeaves

First off, first time posting here so sorry if it's not quite in the right place or confusing but couldn't see anything else to help me.

I have created a custom plugin that is essentially two console commads with a backend configuration section. It all works perfectly in my dev environment (Using Homestead vagrant box). But now that I have put the code live I am just getting an error with my custom code. To put the site live I installed a fresh copy of October and uploaded my plugin and my theme files.

Everything else works fine, plugins from the market and the theme and pages/etc, but when I run "php artisan" on the command line I get a class not found error for my custom console class.

[Symfony\Component\Debug\Exception\FatalErrorException]
  Class 'JonDeaves\Rwb\Console\SyncMailChimp' not found

My Plugin.php file has the following function, but I have also tried it without the JonDeaves part of the namespace

public function register() {
        $this->registerConsoleCommand('jondeaves.syncmailchimp', 'JonDeaves\Rwb\Console\SyncMailChimp');
        $this->registerConsoleCommand('jondeaves.linkblogfacebook', 'JonDeaves\Rwb\Console\LinkBlogFacebook');
}

I suspect I'm doing something silly, but if there is anyone that can help or anything that would be much appreciated, happy to provide any more information, not sure how much is needed.

dshoreman
dshoreman

I've moved this to Help/Support for you.

Is your custom plugin showing in the list on the Backend > Settings > System > Updates page? If not, you may need to run php artisan october:up to install it.

Does your plugin have a composer.json file? If so, you might find you need to run composer install from your plugin directory too. Possibly also composer dumpautoload.

Last updated

jondeaves
jondeaves

Hi thanks for replying,

Trying October:up doesn't seem to have made a difference.

The plugin does show up in the backend, and I am able to see my settings pages that just use a class, but I am unable to load the backend page that is a custom URL. I can also see that my migration has run so it seems the plugin was installed successfully.

If it is easier, I have made the files for the plugin public on Gitlab. https://gitlab.com/jondeaves1/october-rwb-plugin

It may be something simple I done wrong, this is the first time I tried writing a plugin. I'm still getting to grips with OctoberCMS and so very open to guidance on what I done wrong.

Cpt.Meatball
Cpt.Meatball

It could be your deployment server is case sensitive.

Bhargav
Bhargav

@jondeaves Found any solution for this?

ctrlaltdylan
ctrlaltdylan

Any luck autoloading directories outside of the bread and butter models/, components/, controllers/, etc?

paulgrafx
paulgrafx

Late update but I had the same issue and it was related to the case sensitive name - so the solution was cap at the start and everything lowercase. It was also a hosting issue.

I had to update the component name and the relevant name in the plugin.php

public function registerComponents()

1-7 of 7

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.