Forum
Error when viewing 'scores' under TF Learn backend
brett vac
Posts: 84
TF Learn
April 26, 2022
Hello, when I click on "scores" in the TF Learn administrator dashboard (address is administrator/index.php?option=com_tflearn&view=scores ) I get the following error:
count(): Argument #1 ($value) must be of type Countable|array, bool given
Not sure if this is a bug or an error with my database.
Thanks in advance.
brett vac
Posts: 84
April 27, 2022
Hi,
I figured out what causes the bug.
It occurs if I select a search filter such as 'module' from the dropdown menu.
Unfortunately some of the dropdown menus have the wrong argument, so this causes the error: count(): Argument #1 ($value) must be of type Countable|array, bool given
You can check this bug by selecting 'lessons' or any option that shows the search bar with a dropdown menu. Unfortunately since this error is thrown it also hides the search bar and I cannot clear the search results. So I cannot access the item. I will try to find another way to clear the search result so I can keep using the component.
Thanks.
brett vac
Posts: 84
April 27, 2022
Enabling debug now gives me the call stack:
Une erreur est survenue
0 count(): Argument #1 ($value) must be of type Countable|array, bool given
Call stack
# Function Location
1 () JROOT/administrator/components/com_tflearn/includes/V/TfViewList.php:77
2 TfViewList->initiate_list() JROOT/administrator/components/com_tflearn/includes/V/TfViewList.php:47
3 TfViewList->display() JROOT/libraries/src/MVC/Controller/BaseController.php:697
4 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_tflearn/src/Controller/DisplayController.php:19
5 TechFry\Component\TfLearn\Administrator\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:735
6 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:146
7 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:389
8 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
9 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
10 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:278
11 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:63
12 require_once() JROOT/administrator/index.php:32