Set up a Joomla with multilanguage.
In the plugin "Language Filter" set the "Cookie Lifetime" to "Year".
Update it to 4.3.0
Then the error appears "setcookie(): Expects exactly 3 arguments when argument #3 ($expires_or_options) is an array": regardless of template or addons.
No Error
Error: "setcookie(): Expects exactly 3 arguments when argument #3 ($expires_or_options) is an array"
Update Joomla (4.x to 4.3.0)
Tested on 2 installations
Setting Value
PHP Built On Linux xxx.andrehotzler.de 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64
Database Type mysql
Database Version 10.5.18-MariaDB-0+deb11u1
Database Collation utf8mb4_general_ci
Database Connection Collation utf8mb4_general_ci
Database Connection Encryption None
Database Server Supports Connection Encryption No
PHP Version 8.0.28
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 4.3.0 Stable [ Bora ] 18-April-2023 16:00 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Log from "everything.php":
2023-04-19T10:39:15+00:00 CRITICAL 91.35.2.88 error Uncaught Throwable of type ArgumentCountError thrown with message "setcookie(): Expects exactly 3 arguments when argument #3 ($expires_or_options) is an array". Stack trace: #0 [ROOT]/libraries/src/Input/Cookie.php(102): setcookie('f9a9fa82b2a777f...', 'de-DE', Array, '', '', false, false)
#1 [ROOT]/plugins/system/languagefilter/languagefilter.php(807): Joomla\CMS\Input\Cookie->set('f9a9fa82b2a777f...', 'de-DE', Array)
#2 [ROOT]/plugins/system/languagefilter/languagefilter.php(481): PlgSystemLanguageFilter->setLanguageCookie('de-DE')
#3 [ROOT]/libraries/src/Router/Router.php(384): PlgSystemLanguageFilter->parseRule(Object(Joomla\CMS\Router\SiteRouter), Object(Joomla\CMS\Uri\Uri))
#4 [ROOT]/libraries/src/Router/Router.php(144): Joomla\CMS\Router\Router->processParseRules(Object(Joomla\CMS\Uri\Uri), 'preprocess')
#5 [ROOT]/libraries/src/Application/SiteApplication.php(746): Joomla\CMS\Router\Router->parse(Object(Joomla\CMS\Uri\Uri), true)
#6 [ROOT]/libraries/src/Application/SiteApplication.php(232): Joomla\CMS\Application\SiteApplication->route()
#7 [ROOT]/libraries/src/Application/CMSApplication.php(293): Joomla\CMS\Application\SiteApplication->doExecute()
#8 [ROOT]/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()
#9 [ROOT]/index.php(32): require_once('/var/www/k24950...')
#10 {main}
Labels |
Added:
No Code Attached Yet
|
Ah, i didnt find this using google
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-04-19 11:44:26 |
Closed_By | ⇒ | Fedik |
will test tomorrow, thank you
Labels |
Added:
bug
|
#40414 will not bring a solution. Problem still exists with Google Chrome (not with Firefox). But error message changes from setcookie-Error to a 503 error code (service unavailable)
Error does not happen if language filter plugin is disabled. If enabled, cookie lifetime changed to "session" doesn't help
https://docs.joomla.org/J4.x:Error_setCookie()