Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 486

Joomla! 4.x Coding • Re: How to fix error 00 Call to a member function get() on null ($listOrder)

$
0
0
I suspect the problem is your model load line in the view file. You don't need to do that at all.

Instead of your "$this->thing = $model->get<thing>();" lines you want "$this->thing = $this->get('<thing>');". The default model, which is the way you've (correctly) structured your model, will be loaded automatically and used.

Also I would suggest your namespace is badly named. Replacing the "Joomla" for something specific to you will keep your code out of the main Joomla namespace and better separated.

You also don't need the __construct method in the controller. The controller *does* need to be there, but you don't need to re-implement any methods that simply call their parents.

Statistics: Posted by MarkRS — Wed Mar 27, 2024 11:05 am



Viewing all articles
Browse latest Browse all 486

Latest Images

Trending Articles





Latest Images