Error after upgrade to Joomla 4 and 5, with the new plugin, newest version

When I enable debug, the error disappers, and I get no log.
When I disable debug, I only get this error
"array_replace(): Argument #2 must be of type array, string given"

From my log
"2024-01-15T20:24:26+00:00 CRITICAL 78.109.211.67 error Uncaught Throwable of type TypeError thrown with message "array_replace(): Argument #2 must be of type array, string given". Stack trace: #0 [ROOT]/libraries/src/Document/Document.php(619): array_replace(Array, 'text/css')
#1 [ROOT]/templates/ja_builder/index.php(9): Joomla\CMS\Document\Document->addStyleSheet('/media/system/c...', 'text/css')
#2 [ROOT]/libraries/src/Document/HtmlDocument.php(731): require('/home/svgu/publ...')
#3 [ROOT]/libraries/src/Document/HtmlDocument.php(785): Joomla\CMS\Document\HtmlDocument->loadTemplate('/home/svgu/publ...', 'index.php')
#4 [ROOT]/libraries/src/Document/HtmlDocument.php(622): Joomla\CMS\Document\HtmlDocument->
fetchTemplate(Array)
#5 [ROOT]/libraries/src/Application/CMSApplication.php(1057): Joomla\CMS\Document\HtmlDocument->parse(Array)
#6 [ROOT]/libraries/src/Application/SiteApplication.php(732): Joomla\CMS\Application\CMSApplication->render()
#7 [ROOT]/libraries/src/Application/CMSApplication.php(311): Joomla\CMS\Application\SiteApplication->render()
#8 [ROOT]/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#9 [ROOT]/index.php(32): require_once('/home/svgu/publ...')
#10 {main}
2024-01-15T20:24:29+00:00 CRITICAL 78.109.211.67 error Uncaught Throwable of type TypeError thrown with message "array_replace(): Argument #2 must be of type array, string given". Stack trace: #0 [ROOT]/libraries/src/Document/Document.php(619): array_replace(Array, 'text/css')
#1 [ROOT]/templates/ja_builder/index.php(9): Joomla\CMS\Document\Document->addStyleSheet('/media/system/c...', 'text/css')
#2 [ROOT]/libraries/src/Document/HtmlDocument.php(731): require('/home/svgu/publ...')
#3 [ROOT]/libraries/src/Document/HtmlDocument.php(785): Joomla\CMS\Document\HtmlDocument->loadTemplate('/home/svgu/publ...', 'index.php')
#4 [ROOT]/libraries/src/Document/HtmlDocument.php(622): Joomla\CMS\Document\HtmlDocument->
fetchTemplate(Array)
#5 [ROOT]/libraries/src/Application/CMSApplication.php(1057): Joomla\CMS\Document\HtmlDocument->parse(Array)
#6 [ROOT]/libraries/src/Application/SiteApplication.php(732): Joomla\CMS\Application\CMSApplication->render()
#7 [ROOT]/libraries/src/Application/CMSApplication.php(311): Joomla\CMS\Application\SiteApplication->render()
#8 [ROOT]/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#9 [ROOT]/index.php(32): require_once('/home/svgu/publ...')
#10 {main}
2024-01-15T20:24:29+00:00 CRITICAL 78.109.211.67 error Uncaught Throwable of type TypeError thrown with message "array_replace(): Argument #2 must be of type array, string given". Stack trace: #0 [ROOT]/libraries/src/Document/Document.php(619): array_replace(Array, 'text/css')
#1 [ROOT]/templates/ja_builder/index.php(9): Joomla\CMS\Document\Document->addStyleSheet('/media/system/c...', 'text/css')
#2 [ROOT]/libraries/src/Document/HtmlDocument.php(731): require('/home/svgu/publ...')
#3 [ROOT]/libraries/src/Document/HtmlDocument.php(785): Joomla\CMS\Document\HtmlDocument->loadTemplate('/home/svgu/publ...', 'index.php')
#4 [ROOT]/libraries/src/Document/HtmlDocument.php(622): Joomla\CMS\Document\HtmlDocument->
fetchTemplate(Array)
#5 [ROOT]/libraries/src/Application/CMSApplication.php(1057): Joomla\CMS\Document\HtmlDocument->parse(Array)
#6 [ROOT]/libraries/src/Application/SiteApplication.php(732): Joomla\CMS\Application\CMSApplication->render()
#7 [ROOT]/libraries/src/Application/CMSApplication.php(311): Joomla\CMS\Application\SiteApplication->render()
#8 [ROOT]/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#9 [ROOT]/index.php(32): require_once('/home/svgu/publ...')
#10 {main}
2024-01-15T20:24:30+00:00 CRITICAL 78.109.211.67 error Uncaught Throwable of type TypeError thrown with message "array_replace(): Argument #2 must be of type array, string given". Stack trace: #0 [ROOT]/libraries/src/Document/Document.php(619): array_replace(Array, 'text/css')
#1 [ROOT]/templates/ja_builder/index.php(9): Joomla\CMS\Document\Document->addStyleSheet('/media/system/c...', 'text/css')
#2 [ROOT]/libraries/src/Document/HtmlDocument.php(731): require('/home/svgu/publ...')
#3 [ROOT]/libraries/src/Document/HtmlDocument.php(785): Joomla\CMS\Document\HtmlDocument->loadTemplate('/home/svgu/publ...', 'index.php')
#4 [ROOT]/libraries/src/Document/HtmlDocument.php(622): Joomla\CMS\Document\HtmlDocument->
fetchTemplate(Array)
#5 [ROOT]/libraries/src/Application/CMSApplication.php(1057): Joomla\CMS\Document\HtmlDocument->parse(Array)
#6 [ROOT]/libraries/src/Application/SiteApplication.php(732): Joomla\CMS\Application\CMSApplication->render()
#7 [ROOT]/libraries/src/Application/CMSApplication.php(311): Joomla\CMS\Application\SiteApplication->render()
#8 [ROOT]/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#9 [ROOT]/index.php(32): require_once('/home/svgu/publ...')
#10 {main}"

I have tried to remove all but JA_builder and JEvents, as plugin/components/ add ons.
error persists.
I have recreated the website from a backup.

    gundestrup Hi

    It seems to be compatibility issue of the new PHP version, if you're using Joomla 3, you can use PHP 7.4, with PHP 8.x it will throw these errors.

    I am using php 8.1 (newerst version)
    The error
    "2024-01-15T20:24:30+00:00 CRITICAL 78.109.211.67 error Uncaught Throwable of type TypeError thrown with message "array_replace(): Argument #2 must be of type array, string given". Stack trace: #0 [ROOT]/libraries/src/Document/Document.php(619): array_replace(Array, 'text/css')"

    is critical meaning, page is broken / not working.....

    I am having the same defunkt site in joomla 4 + 5.
    Defunkt - meaning critial error and site not working.

    Regards
    Svend

      gundestrup Thanks for sharing the info, could share the URL of page where I can see that critical error?

      5 days later

      I replied in that ticket, pls follow it.

      Write a Reply...
      You need to Login to view replies.