Kunena 6.2.5 & module Kunena Latest 6.0.7 released

The Kunena team has announce the arrival of Kunena 6.2.5 [K 6.2.5] which is now available for download as a native Joomla extension for J! 4.3.x/4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

This category is for the plugin developed, endorsed, maintained and supported by the Kunena project team. The topics in this category only relate to the plugin developed for K 3.0 and later versions.

If you are having problems then, for your own benefit, it would save us all a lot of time if you would kindly post your configuration report when you ask for help from this forum. If you do not post your configuration report we will not ask you for it but you will probably not get your problem solved, either.

Question Kunenadiscuss is not creating new topic

More
5 years 8 months ago #1 by tnacsak
First of all, I am new on the forum but hopefully found the right category to write new topic - if not help me to move to the right place!

After upgrading Kunena Forum to version 5.1.1 and Kunena discuss to 5.1.0 as Joomla update drives me I recogniesed the Kunenadiscuss is not creating topic for new articles at the first read.
I switch on debug mode but the messages show that everything looks fine, except the error message at the top, that I have to turn to the site admin.
I went through the code adding extra debug messages and recognised that the "turn to admin" error message came from the createReference function in kunenadiscuss.php when it tries to insert into kunenadiscuss table. The route cause is that there is no topic->id!

It should be set by the $message->save() call in createTopic(). It was so interesting that the check of $success shows that everything is fine but it is not!

I turned to Kunena message->save() to check what happens, after inspecting through all the steps beforehand and everything looks fine: all attributes, array was filled properly.

Finally I recognised that the problem is at the start of message.php in libraries/kunena/forum/message folder.
The code starts with:
Code:
$user = KunenaUserHelper::getMyself();
which returns 0, since no one is logged it, as expected. This is the reason why kunenadiscuss sets message->userid by the author of the article.
I added the following line after this get and before the next check
Code:
// // Nacsák: Check if message already got a userid in advance // if ($user->userid == 0 && $this->userid) { $user = KunenaUserHelper::get($this->userid); }

That solved the problem, and everything works fine but I am not sure if it is the right solution or not since:
  • I did not check the source of previous versions therefore I do not know what was changed
  • Interseting the the caller of message->save() is not handling the error return code coming from the save and the error is not populated at all - potentially it is an other bug
Anyway, please help me record it as a bug and on the other hand I hope that my description helps to fix.

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

More
5 years 8 months ago #2 by rich

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

More
5 years 8 months ago #3 by tnacsak
Hi!

I was happy to install the suggested version but with no result. The issues is still there, Kunena itself does not recognise that a topic owner sent by Kunena Discuss in the message object.

The fix I made on Kunena (and not on dicsuss) still fixes the trouble.

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

More
5 years 8 months ago #4 by 810
yes, your fix is right. Looks like the new check if guest can write public, breaks it.
I don't see why, but it will, maybe its breaking somewhere else.


I will include your fix. thnx

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

Time to create page: 0.415 seconds