I'm using a model of other component in my component. I'm following this solution. But, when I try to call the getItem
method of the model I get the error "Call to a member function load() on a non-object". In the model, the lines that cause the error is:
...
$table = $this->getTable();
// Attempt to load the row.
$return = $table->load($itemId);
...
What am I missing?
var_dump
returnsbool(false)
. The model belongs to other component, so it is trying to load a table from that component. Take a look at the link above to see how I'm importing the model.JTable::addIncludePath
works. Thanks