I'm trying to build my first plugin using a service but i can't seem to get it to work.

The file is named CampaignReports_CampaignMonitorService.php and it's in the services folder of my plugin.

This is the code of the service:

class CampaignReports_CampaignMonitorService extends BaseApplicationComponent

    public function __construct()


    public function getSettings()
        return true;

I'm calling the service as follow:


This causes an internal server error with the following message:

Internal Server Error

Property "Craft\WebApp.campaignReports_CampaignMonitor" is not defined.

Any idea what i'm doing wrong? Probably some naming convention I haven't followed exactly but I just don't find it

1 Answer 1


Looks like a casing issue to me. You should be calling:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.