No Code Attached Yet bug
avatar ahotzler
ahotzler
19 Apr 2023

Steps to reproduce the issue

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.

Expected result

No Error

Actual result

Error: "setcookie(): Expects exactly 3 arguments when argument #3 ($expires_or_options) is an array"

System information (as much as possible)

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

Additional comments

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}

avatar ahotzler ahotzler - open - 19 Apr 2023
avatar joomla-cms-bot joomla-cms-bot - change - 19 Apr 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Apr 2023
avatar ahotzler
ahotzler - comment - 19 Apr 2023

Ah, i didnt find this using google

avatar Fedik Fedik - change - 19 Apr 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-04-19 11:44:26
Closed_By Fedik
avatar Fedik Fedik - close - 19 Apr 2023
avatar Fedik
Fedik - comment - 19 Apr 2023

Please test #40414

avatar ahotzler
ahotzler - comment - 19 Apr 2023

will test tomorrow, thank you

avatar richard67 richard67 - change - 19 Apr 2023
Labels Added: bug
avatar richard67 richard67 - labeled - 19 Apr 2023
avatar sentixGmbH
sentixGmbH - comment - 25 Apr 2023

#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)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40421.

avatar sentixGmbH
sentixGmbH - comment - 25 Apr 2023

Error does not happen if language filter plugin is disabled. If enabled, cookie lifetime changed to "session" doesn't help


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40421.

Add a Comment

Login with GitHub to post a comment