Problem displaying course after creating it
After creating a course, I get this error. On the timeline and courses-home, the created course is visible, but when I click on it, the error appears again. What could be the problem?
Fatal error: Uncaught TypeError: mb_substr(): Argument #1 ($string) must be of type string, array given in /home/domains/XXXXX.cz/web/public/inc/utils.inc.php:867 Stack trace: #0 /home/domains/XXXXX.cz/web/public/inc/utils.inc.php(867): mb_substr() #1 /home/domains/XXXXX.cz/web/public/template/scripts/BxBaseFormView.php(916): get_mb_substr() #2 /home/domains/XXXXX.cz/web/public/modules/base/general/classes/BxBaseModGeneralFormEntry.php(816): BxBaseFormView->genViewRowValue() #3 /home/domains/XXXXX.cz/web/public/template/scripts/BxBaseFormView.php(787): BxBaseModGeneralFormEntry->genViewRowValue() #4 /home/domains/XXXXX.cz/web/public/template/scripts/BxBaseFormView.php(775): BxBaseFormView->_genViewRowWrapped() #5 /home/domains/XXXXX.cz/web/public/modules/base/general/classes/BxBaseModGeneralFormEntry.php(826): BxBaseFormView->genViewRowWrapped() #6 /home/domains/XXXXX.cz/web/public/template/scripts/BxBaseFormView.php(761): BxBaseModGeneralFormEntry->genViewRowWrapped() #7 /home/domains/XXXXX.cz/web/public/template/scripts/BxBaseFormView.php(620): BxBaseFormView->genViewRow() #8 /home/domains/XXXXX.cz/web/public/template/scripts/BxBaseFormView.php(488): BxBaseFormView->genRows() #9 /home/domains/XXXXX.cz/web/public/template/scripts/BxBaseFormView.php(349): BxBaseFormView->genForm() #10 /home/domains/XXXXX.cz/web/public/modules/base/general/classes/BxBaseModGeneralFormEntry.php(128): BxBaseFormView->getCode() #11 /home/domains/XXXXX.cz/web/public/modules/base/general/classes/BxBaseModGeneralFormsEntryHelper.php(611): BxBaseModGeneralFormEntry->getCode() #12 /home/domains/XXXXX.cz/web/public/modules/base/general/classes/BxBaseModGeneralModule.php(3934): BxBaseModGeneralFormsEntryHelper->viewDataForm() #13 /home/domains/XXXXX.cz/web/public/modules/base/general/classes/BxBaseModGeneralModule.php(1737): BxBaseModGeneralModule->_serviceEntityForm() #14 /home/domains/XXXXX.cz/web/public/inc/classes/BxDolRequest.php(129): BxBaseModGeneralModule->serviceEntityInfo() #15 /home/domains/XXXXX.cz/web/public/inc/classes/BxDolRequest.php(57): BxDolRequest::_perform() #16 /home/domains/XXXXX.cz/web/public/inc/classes/BxDolService.php(52): BxDolRequest::processAsService() #17 /home/domains/XXXXX.cz/web/public/inc/classes/BxDolService.php(82): BxDolService::call() #18 /home/domains/XXXXX.cz/web/public/template/scripts/BxBasePage.php(1215): BxDolService::callSerialized() #19 /home/domains/XXXXX.cz/web/public/template/scripts/BxBasePage.php(838): BxBasePage->_getBlockService() #20 /home/domains/XXXXX.cz/web/public/template/scripts/BxBasePage.php(772): BxBasePage->_getBlockCode() #21 /home/domains/XXXXX.cz/web/public/template/scripts/BxBasePage.php(710): BxBasePage->_getBlockCodeWithCache() #22 /home/domains/XXXXX.cz/web/public/template/scripts/BxBasePage.php(753): BxBasePage->_getPageCodeVars() #23 /home/domains/XXXXX.cz/web/public/template/scripts/BxBasePage.php(273): BxBasePage->_getPageCode() #24 /home/domains/XXXXX.cz/web/public/modules/base/general/classes/BxBaseModGeneralPageEntry.php(100): BxBasePage->getCode() #25 /home/domains/XXXXX.cz/web/public/modules/base/profile/classes/BxBaseModProfilePageEntry.php(144): BxBaseModGeneralPageEntry->getCode() #26 /home/domains/XXXXX.cz/web/public/modules/base/groups/classes/BxBaseModGroupsPageEntry.php(108): BxBaseModProfilePageEntry->getCode() #27 /home/domains/XXXXX.cz/web/public/inc/classes/BxDolPage.php(747): BxBaseModGroupsPageEntry->getCode() #28 /home/domains/XXXXX.cz/web/public/inc/classes/BxDolPage.php(429): BxDolPage->displayPage() #29 /home/domains/XXXXX.cz/web/public/r.php(30): BxDolPage::processSeoLink() #30 {main} thrown in /home/domains/XXXXX.cz/web/public/inc/utils.inc.php on line 867
-
-
- · PavelS
-
·
In reply to LeonidS
- ·
Hello @LeonidS , I have PHP version 8.2, but I can try switching to 8.3
-
- · PavelS
- ·
I switched to version 8.3 and unfortunately no change.
The function
mb_substr()
(multibyte string substr) expects the first argument to be of typestring
, but anarray
is being passed instead. Themb_substr()
function is used to manipulate strings, but it cannot work with arrays. This issue occurs specifically on line 867 in yourutils.inc.php
file. -
- · PavelS
- ·
I reinstalled the whole module and it seems to be fine again..i wonder what happened🤔