Kunena 7.0.11 & Kunena 6.4.16 – Security Updates Released and K7.1 in RC1 2

The Kunena team has announce the arrival of three simultaneous security release : K6.4.16, K7.0.11 and K7.1 RC2. Just a reminder K6.4.16 receives only securities fixes untill end of 2026, so it's advised for users to upgrade to K7.0.11. K7.0.11 is the last release of the K7.0 because it's replaced by K7.1 branch with the stable release in the corner. The translations for K7.1 on crowdin.com/project/kunena-forum-7-1 needs to be checked or improved becasue it has been generated by TM (Translation Machine).

Question 500 Internal Server Error on new topic in PHP 7 and Joomla! 3.5

More
10 years 7 months ago - 10 years 7 months ago #173913 by HugCoder
I don't get the error when viewing topics but when I try to create a new topic I get this:
"
500 Internal Server Error
Fatal Error was detected!

The error was detected in the Libraries.

Fatal Error: Cannot use 'String' as class name as it is reserved in libraries/vendor/joomla/string/src/String.php on line 19
"
If I comment the line 19 out I instead get this Kunena error:
"
The error was detected in the Kunena Component.

Fatal Error: Method KunenaLayoutTopicEditEditor::__toString() must not throw an exception, caught Error: Class 'Joomla\String\String' not found in components/com_kunena/template/crypsis/layouts/topic/edit/default.php on line 0
"

If you are using String, you should start using StringHelper instead. All String does is extend StringHelper.

Using PHP 7, Kunena 4.0.10 and Joomla! 3.5.
Using PHP 5.6.18 seems to remove this error, so apparently it's incompatability with PHP7 that is the issue.
Last edit: 10 years 7 months ago by HugCoder.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #173917 by xillibit
Hello,

Untill the new release, you can apply the following fix :

-open the file : \components\com_kunena\template\crypsis\layouts\topic\edit\editor\default.php
-At line 111 change the following :
Code:
echo '<option value = "' . (! empty ( $vid_type [1] ) ? $this->escape($vid_type [1]) : Joomla\String\String::strtolower ( $this->escape($vid_type [0]) ) . '') . '">' . $this->escape($vid_type [0]) . '</option>';

by :
Code:
echo '<option value = "' . (! empty ( $vid_type [1] ) ? $this->escape($vid_type [1]) : Joomla\String\StringHelper::strtolower ( $this->escape($vid_type [0]) ) . '') . '">' . $this->escape($vid_type [0]) . '</option>';

I don't provide support by PM, because this can be useful for someone else.
The following user(s) said Thank You: rogoghaje

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #173922 by 810
crypsis is not php7 supported, until K5.0

Please Log in or Create an account to join the conversation.

Time to create page: 0.127 seconds