I am adapting the component to the new structure and classes of joomla 4. I started with the admin panel of my component. The list and the edit page are displayed without errors, but when I try to use any toolbar buttons, I get a message.
Call to a member function getTable() on bool
Call stack
# Function --- Location
1 () --- JROOT/libraries/src/MVC/Controller/FormController.php:307
2 Joomla\CMS\MVC\Controller\FormController->cancel() ---JROOT/libraries/src/MVC/Controller/BaseController.php:730
3 Joomla\CMS\MVC\Controller\BaseController->execute() --- JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:146
4 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() ---JROOT/libraries/src/Component/ComponentHelper.php:389
5 Joomla\CMS\Component\ComponentHelper::renderComponent() --- JROOT/libraries/src/Application/AdministratorApplication.php:143
6 Joomla\CMS\Application\AdministratorApplication->dispatch() --- JROOT/libraries/src/Application/AdministratorApplication.php:186
7 Joomla\CMS\Application\AdministratorApplication->doExecute() --- JROOT/libraries/src/Application/CMSApplication.php:278
8 Joomla\CMS\Application\CMSApplication->execute() --- JROOT/administrator/includes/app.php:63
9 require_once() --- JROOT/administrator/index.php:32
The controller is triggered, so is the model. The model has a getTable() function. Theoretically, everything works, but when 'save', 'closing', or 'save and close', I get the same error. At the same time, the chain of methods does not reach the component model.
JROOT/libraries/src/MVC/Controller/FormController has no access (or connection) to my model.
The path to the model is administrator/components/com_mycom/src/Model/NameModel.php. I don't understand what the reason is.