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

denis.rendler
denis.rendler

Hello.

I'm trying to retrieve the settings for my plug-in in the register() method but I keep getting the following error:

FatalErrorException in Model.php line 3146: 
Call to a member function connection() on null

Is this possible?

I also have issues with registering a front-end controller using the mentioned steps in the documentation but I keep getting: "... does not have a method definition for getAfterFilters"

Thanks, Denis

alxy
alxy

I had this problem as well. The problem is that the database connection isnt initialized at this stage of the application. Solution: Move that code in the boot() method - that one is called when other services are registered and initialized.

denis.rendler
denis.rendler

Hello, @alxy!

I figured as much. I was trying to add a new route during plug-in initialization. Thanks for the answer. :)

denis.rendler
denis.rendler

hey, guys!

I wrote a quick article how to extend a plug-in component if anyone is interested. http://j.mp/1FH4kfG2

1-4 of 4

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