- Posts: 5
- Thank you received: 1
Kunena 7.0.8 Released
The Kunena team has announce the arrival of Kunena 7.0.8 [K 7.0.8] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x./6.1.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0
Solved User can't post a message - Unsupported operand types: string + string
3 years 1 month ago #228531
by oxygen77
Hello,
Our kunena forum has been migrated some weeks ago from Joomla 3 to 4 and we are now using latest version of kunena.
joomla: 4.3.2
kunena: 6.1.1
template/theme with gantry5 / helium
Some user are not able to post replies and they have following error displayed on their side:
"0 Unsupported operand types: string + string"
I'm not able on myside to reproduce the issue.
In webserver logs I can see a 500 response code on POST https://FQDN/
Enabling some debug on joomla I get this stack (I'm obfuscated the IP address)
kunena debug mode is not showing info (I guess this is only available for admin account ?)
Happy to give you more context / info.
Our kunena forum has been migrated some weeks ago from Joomla 3 to 4 and we are now using latest version of kunena.
joomla: 4.3.2
kunena: 6.1.1
template/theme with gantry5 / helium
Some user are not able to post replies and they have following error displayed on their side:
"0 Unsupported operand types: string + string"
I'm not able on myside to reproduce the issue.
In webserver logs I can see a 500 response code on POST https://FQDN/
Enabling some debug on joomla I get this stack (I'm obfuscated the IP address)
Code:
2023-07-05T12:52:41+00:00 CRITICAL error Uncaught Throwable of type TypeError thrown with message "Unsupported operand types: string + string". Stack trace: #0 [ROOT]/libraries/kunena/src/Database/(206): Kunena\Forum\Libraries\Forum\Message\KunenaMessage->check()
#1 [ROOT]/libraries/kunena/src/Forum/Message/(688): Kunena\Forum\Libraries\Database\KunenaDatabaseObject->save()
#2 [ROOT]/components/com_kunena/src/Controllers/(831): Kunena\Forum\Libraries\Forum\Message\KunenaMessage->save()
#3 [ROOT]/libraries/kunena/src/Controller/(319): Kunena\Forum\Site\Controllers\TopicController->post()
#4 [ROOT]/libraries/kunena/src/Controller/(226): Kunena\Forum\Libraries\Controller\KunenaController->executeTask()
#5 [ROOT]/components/com_kunena/src/Dispatcher/(108): Kunena\Forum\Libraries\Controller\KunenaController->execute()
#6 [ROOT]/libraries/src/Component/(361): Kunena\Forum\Site\Dispatcher\Dispatcher->dispatch()
#7 [ROOT]/libraries/src/Application/(208): Joomla\CMS\Component\ComponentHelper::renderComponent()
#8 [ROOT]/libraries/src/Application/(249): Joomla\CMS\Application\SiteApplication->dispatch()
#9 [ROOT]/libraries/src/Application/(293): Joomla\CMS\Application\SiteApplication->doExecute()
#10 [ROOT]/includes/(61): Joomla\CMS\Application\CMSApplication->execute()
#11 [ROOT]/(32): require_once('...')
#12 {main}
kunena debug mode is not showing info (I guess this is only available for admin account ?)
Happy to give you more context / info.
Please Log in or Create an account to join the conversation.
3 years 1 month ago #228586
by oxygen77
Replied by oxygen77 on topic User can't post a message - Unsupported operand types: string + string
Adding some info,
I've looked into the code and debug a bit the issue.
The error appears in (), near line 1422, there is a SQL that do:
select MAX(time) from kunena_messages where ip='USER_IP';
where USER_IP is a parameter,
It looks like the result is malformated and is not a date in some cases.
I notice that in the table the ip column can have NULL in some cases.
Also, I was wondering if the following code is supposed to be ok if we don't find the IP, $lastPostTime is NULL in this case ?
I've looked into the code and debug a bit the issue.
The error appears in (), near line 1422, there is a SQL that do:
select MAX(time) from kunena_messages where ip='USER_IP';
where USER_IP is a parameter,
It looks like the result is malformated and is not a date in some cases.
I notice that in the table the ip column can have NULL in some cases.
Also, I was wondering if the following code is supposed to be ok if we don't find the IP, $lastPostTime is NULL in this case ?
Code:
if ($lastPostTime + $config->floodProtection > Factory::getDate()->toUnix()) {
throw new Exception(Text::sprintf('COM_KUNENA_LIB_MESSAGE_ERROR_FLOOD', (int) $config->floodProtection));
return false;
}
Please Log in or Create an account to join the conversation.
3 years 4 weeks ago #228600
by oxygen77
Replied by oxygen77 on topic User can't post a message - Unsupported operand types: string + string
any insigt from the dev team ?
Is it a joomla migration 3 => 4 (or following kunena update) that were not OK ?
Should I fix account in the table ?
Is it a joomla migration 3 => 4 (or following kunena update) that were not OK ?
Should I fix account in the table ?
Please Log in or Create an account to join the conversation.
3 years 4 weeks ago #228602
by xillibit
I don't provide support by PM, because this can be useful for someone else.
Replied by xillibit on topic User can't post a message - Unsupported operand types: string + string
Hello,
I haven't looked yet at this issue, if you modify directly in the table the issue could come an another time with others users
I haven't looked yet at this issue, if you modify directly in the table the issue could come an another time with others users
I don't provide support by PM, because this can be useful for someone else.
Please Log in or Create an account to join the conversation.
3 years 4 weeks ago #228610
by oxygen77
Replied by oxygen77 on topic User can't post a message - Unsupported operand types: string + string
thx for your feedback, I'll wait for a deeper analyse, current status is that without flood protection it is ok.
I can provide you with some data from DB if needed
I can provide you with some data from DB if needed
Please Log in or Create an account to join the conversation.
3 years 4 weeks ago #228625
by gioorl
Replied by gioorl on topic User can't post a message - Unsupported operand types: string + string
Same problem on my website which was migrated to Joomla 4 and Kunena 6 last year.
Has been working fine until Kunena 6.1.1 and then Registered users started reporting issues replying to posts.
Super Users are not affected by this problem.
Submitting a Reply in "Private message" works just fine but not in standard "Message". "Thank you" features and "Polls" work too.
Strangely, if a registered user posts a "Private message" and then edits it to become a standard "Message", the post is saved correctly.
Disabling flood protection in the Kunena config removes the problem as reported by oxygen77 (Thanks for that tip) but setting it to a high value does not resolve the issue
Has been working fine until Kunena 6.1.1 and then Registered users started reporting issues replying to posts.
Super Users are not affected by this problem.
Submitting a Reply in "Private message" works just fine but not in standard "Message". "Thank you" features and "Polls" work too.
Strangely, if a registered user posts a "Private message" and then edits it to become a standard "Message", the post is saved correctly.
Disabling flood protection in the Kunena config removes the problem as reported by oxygen77 (Thanks for that tip) but setting it to a high value does not resolve the issue
Please Log in or Create an account to join the conversation.
Time to create page: 0.308 seconds