problems upgrading an extension to J4.0 Topic is solved

Be informed that this forum is not an official support forum for Joomla! 4.0. Any issues regarding Joomla! 4.0 must be reported at https://issues.joomla.org/.

Joomla 4.0 is still in Beta stage. This forum should be used for sharing information about Joomla! 4.0.

Moderator: ooffick

Forum rules
Locked
rgjoyce
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Thu Jun 15, 2006 2:03 am
Location: Russia
Contact:

problems upgrading an extension to J4.0

Post by rgjoyce » Fri Dec 21, 2018 2:17 pm

Does anyone know if extending Joomla classes is still possible?
I have my own library that extends core code a bit, but I'm getting an error.
Call to a member function createModel() on null
in my library, I do this:
class RmkControllerForm extends JControllerForm{

and in my components controller, I am doing this:

$controller = JControllerLegacy::getInstance('Registrationmanagerking');

$controller->execute($input->getCmd('task', ''));

its the execute command that triggers the error.

Any ideas?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17439
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: problems upgrading an extension to J4.0

Post by toivo » Sun Dec 23, 2018 10:58 am

JControllerForm has been aliased to ControllerForm, but you could try extending ControllerForm in your component.
Toivo Talikka, Global Moderator

rgjoyce
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Thu Jun 15, 2006 2:03 am
Location: Russia
Contact:

[Resolved] Re: problems upgrading an extension to J4.0

Post by rgjoyce » Mon Dec 24, 2018 3:41 am

The problem was because I forgot to call the parent constructor from within my constructor.

Resolved.


Locked

Return to “Joomla! 4 Related”