Useful information in the reports module : xclass, ajax, cliKeys, eID, general status of the system (encoding, DB, php vars...), hooks, compare local and TER extension (diff), used content type, used plugins, ExtDirect... It can really help you during migration or new existing project (to have a global reports of the system).
Other
12
stars
11
forks
source link
Error, in extension list, if you have no dev or unloaded extension #26
If you have not dev and/or unloaded extensions
=> the variables $allExtension['dev'] and/or $allExtension['unloaded'] (from \Sng\AdditionalReports\Utility::getInstExtList) are not array and count method breack on line 59 and or 65.
(It could also breack on line 46 but as you have this ter extension... $allExtension['ter'] is an array.
To Reproduce
Steps to reproduce the behavior:
Try this extension on new or clean installation (with no unloaded extension or with no dev (not on TER) extension) and try to list the loaded extension.
You should have one of the two followings errors :
#1476107295: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/typo3conf/ext/additional_reports/Classes/Reports/Extensions.php line 65 (if you don't have dev (= not on ter) extension).
#1476107295: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/typo3conf/ext/additional_reports/Classes/Reports/Extensions.php line 65 (if you don't have unloaded extension).
Expected behavior
There should be no error.
Screenshots
Used versions (please complete the following information):
EXT:solr Version: 11.0.4, but also other version with this template file
TYPO3 8.7 (in upgrade process to TYPO3 10 i discovered this issue)
** Solution :
declare these 3 arrays : $list['ter'] = $list['dev'] = $list['unloaded'] = []; (in typo3conf/ext/additional_reports/Classes/Utility.php) in order count() don't breack (in typo3conf/ext/additional_reports/Classes/Reports/Extensions.php).
or
test with :
if (is_array($allExtension['ter']) && count($allExtension['ter']) > 0)
if (is_array($allExtension['dev']) && count($allExtension['dev']) > 0)
if (is_array($allExtension['unloaded']) && count($allExtension['unloaded']) > 0)
I prefere Solution 1 for one line add instead 3 lines
I will do a push and Mr, feel free to choose the solution you want.
Salut Yohann
Describe the bug
If you have not dev and/or unloaded extensions => the variables $allExtension['dev'] and/or $allExtension['unloaded'] (from \Sng\AdditionalReports\Utility::getInstExtList) are not array and count method breack on line 59 and or 65.
(It could also breack on line 46 but as you have this ter extension... $allExtension['ter'] is an array.
To Reproduce Steps to reproduce the behavior: Try this extension on new or clean installation (with no unloaded extension or with no dev (not on TER) extension) and try to list the loaded extension. You should have one of the two followings errors :
#1476107295: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/typo3conf/ext/additional_reports/Classes/Reports/Extensions.php line 65
(if you don't have dev (= not on ter) extension).#1476107295: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/typo3conf/ext/additional_reports/Classes/Reports/Extensions.php line 65
(if you don't have unloaded extension).Expected behavior There should be no error.
Screenshots
Used versions (please complete the following information):
EXT:solr Version: 11.0.4, but also other version with this template file
** Solution :
I prefere Solution 1 for one line add instead 3 lines
I will do a push and Mr, feel free to choose the solution you want.