No Code Attached Yet
avatar joomlahenk
joomlahenk
5 Sep 2022

Steps to reproduce the issue

Menus -> All menu items

Expected result

List of all menu items

Actual result

Call to undefined method Joomla\CMS\Form\Field\MenuField::getDatabase()

Call stack:

| Function | Location

1 | () | JROOT/libraries/src/Form/Field/MenuField.php:49
2 | Joomla\CMS\Form\Field\MenuField->getGroups() | JROOT/libraries/src/Form/Field/GroupedlistField.php:160
3 | Joomla\CMS\Form\Field\GroupedlistField->getInput() | JROOT/administrator/components/com_fabrik/classes/FormField.php:468

System information (as much as possible)

Joomla 4.2.2, PHP8.1, MySQL5.7

Additional comments

The extension uses a class override for FormField.php.
In Joomla 4.1.5 this was working.
In Joomla 4.2.x in libraries/src/Form/Field/MenuField.php:49, $db = Factory::getDbo(); is changed to $db = $this->getDatabase();
now causing this error.
If I change $db = $this->getDatabase(); back to $db = Factory::getDbo(); the issue is solved.

avatar joomlahenk joomlahenk - open - 5 Sep 2022
avatar joomla-cms-bot joomla-cms-bot - change - 5 Sep 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Sep 2022
avatar ReLater
ReLater - comment - 5 Sep 2022

Even if I fully understand the frustration about this B\C breaking change in v4.2.2 (a so called "improvement") I think you should ask the developers of com_fabrik to adapt their extension.

The chances are slim that this will be fixed in Joomla core. That's just my opinion...

avatar joomlahenk joomlahenk - change - 6 Sep 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-09-06 12:22:39
Closed_By joomlahenk
avatar joomlahenk joomlahenk - close - 6 Sep 2022
avatar joomlahenk
joomlahenk - comment - 6 Sep 2022

OK, not a Joomla 4.2.2 bug. Solved in com_fabrik

Add a Comment

Login with GitHub to post a comment