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

Question Deprecated in Kunena Latest 6.2.1

More
2 weeks 6 days ago #235180 by Gindi
Whilst trying to find the error in the Kunena Forum Editor causing user posts to be stretched, I enabled debug mode in both Joomla and Kunena. In Joomla, I set error reporting to maximum.I then noticed that, on the user home page after I’d logged in, the ‘Kunena Latest’ module displayed the following message:Deprecated: Creation of dynamic property Kunena\Module\KunenaLatest\Site\ModuleKunenaLatest::$application is deprecated in /srv/www/htdocs/BFB612/modules/mod_kunenalatest/src/ModuleKunenaLatest.php on line 33In several tests, I was able to see that this message does not come from Kunena Debug but from Joomla Debug. With Kunena Latest 6.1.0, the message does not appear. The message only appears with Kunena Latest 6.2.1, regardless of the Joomla or Kunena version.However, I could not detect any issues with Kunena Latest 6.2.1.
 
The following user(s) said Thank You: xillibit

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

More
2 weeks 6 days ago - 2 weeks 6 days ago #235181 by Leen
Hello Gindi
The module was last modified with the help of ChatGpt
replace in
" module/mod_kunenalatest/src/ModuleKunenaLatest.php"
Code:
$this->application = Factory::getApplication(); // Boot Kunena component for use of Kunena registered function in non com_kunena page if (!$this->application->bootComponent('com_kunena')) {  return; }
for this one
Code:
$application = Factory::getApplication(); // Boot Kunena component for use of Kunena registered function in non com_kunena page if (!$application->bootComponent('com_kunena')) {  return; }
the complete file will then be
Code:
<?php /**  * Kunena Latest Module  *  * @package       Kunena.mod_kunenalatest  *  * @Copyright     @kunenacopyright@  * @license       http://www.gnu.org/copyleft/gpl.html GNU/GPL  * @link          https://www.kunena.org  **/ namespace Kunena\Module\KunenaLatest\Site; use Joomla\CMS\Factory; use Joomla\CMS\Helper\ModuleHelper; use Joomla\CMS\Uri\Uri; use Kunena\Forum\Libraries\Factory\KunenaFactory; use Kunena\Forum\Libraries\Forum\KunenaForum; use Kunena\Forum\Libraries\Module\KunenaModule; use Kunena\Forum\Libraries\User\KunenaUserHelper; defined('_JEXEC') or die(); /**  * Class ModuleKunenaLatest  */ class ModuleKunenaLatest extends KunenaModule {     protected function _display(): void     {         $this->document->getWebAssetManager()->registerAndUseStyle(             'kunenalatest',             Uri::root() . '/modules/mod_kunenalatest/tmpl/css/kunenalatest.css'         );         $application = Factory::getApplication();         // Boot Kunena component for use of Kunena registered function in non com_kunena page         if (!$application->bootComponent('com_kunena')) {             return;         }         // Load language files.         KunenaFactory::loadLanguage('com_kunena.sys', 'admin');         KunenaFactory::loadLanguage();         KunenaFactory::loadLanguage('com_kunena.templates');         // Convert module parameters into topics view parameters         $categories = $this->params->get('category_id', 0);         $this->params->set('limitstart', 0);         $this->params->set('limit', $this->params->get('nbpost', 5));         $this->params->set('topics_categories_klatest', $categories);         $this->params->set('topics_catselection_klatest', $this->params->get('sh_category_id_in', 1));         $this->params->set('topics_time', $this->params->get('show_list_time', 168));         $userid = KunenaUserHelper::get()->userid;         switch ($this->params->get('choosemodel')) {             case 'latestposts':                 $userid = 0;                 $layout = 'posts';                 $mode = 'recent';                 break;             case 'noreplies':                 $layout = 'default';                 $mode = 'noreplies';                 break;             case 'catsubscriptions':                 // TODO                 break;             case 'subscriptions':                 $userid = -1;                 $layout = 'user';                 $mode = 'subscriptions';                 break;             case 'favorites':                 $userid = -1;                 $layout = 'user';                 $mode = 'favorites';                 break;             case 'owntopics':                 $layout = 'user';                 $mode = 'posted';                 break;             case 'deleted':                 $layout = 'posts';                 $mode = 'deleted';                 break;             case 'saidthankyouposts':                 $userid = -1;                 $layout = 'posts';                 $mode = 'mythanks';                 break;             case 'gotthankyouposts':                 $userid = -1;                 $layout = 'posts';                 $mode = 'thankyou';                 break;             case 'userposts':                 $userid = -1;                 $layout = 'posts';                 $mode = 'recent';                 break;             case 'latesttopics':             default:                 $layout = 'default';                 $mode = 'recent';         }         $this->params->set('modlastestcontext', true);         $this->params->set('layout', $layout);         $this->params->set('mode', $mode);         $this->params->set('userid', $userid);         $this->params->set(             'moreuri',             "index.php?option=com_kunena&view=topics&layout={$layout}&mode={$mode}"             . ($userid ? "&userid={$userid}" : '')         );         // Set template path to module         $this->params->set(             'templatepath',             dirname(ModuleHelper::getLayoutPath('mod_kunenalatest'))         );         // Display topics view         KunenaForum::display('Topics', $layout, null, $this->params);     }     /**      * Shorten link given with the given length      *      * @param   string $link      * @param   int    $len      *      * @return string      */     public static function shortenLink($link, $len)     {         return preg_replace('/>([^<]{' . $len . '})[^<]*</u', '>\1...<', $link);     } }
 

With kind regards
Leen
Last edit: 2 weeks 6 days ago by Leen.
The following user(s) said Thank You: Gindi

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

More
2 weeks 6 days ago #235182 by xillibit
Hello,

Thanks you both, i will add the fix for next release of kunena latest

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

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

More
2 weeks 5 days ago - 2 weeks 5 days ago #235186 by Gindi
Leen, thanks for pointing that out.
I’ve removed the “this->” from lines 33 and 36, and now the message no longer appears.
I’ll correct it on my Lifesite too.
Thanks. 
 
Last edit: 2 weeks 5 days ago by Gindi.
The following user(s) said Thank You: Leen

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

More
18 hours 35 minutes ago #235267 by xillibit
Fixed in version 6.2.2

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.

Time to create page: 0.247 seconds