×
Kunena 5.1.2 Released - Security Release (15 Jul 2018)

The Kunena team has announce the arrival of Kunena 5.1.2 [K 5.1.2] which is now available for download as a native Joomla extension for J! 3.8.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1. This is a Security release.

× 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
6 days 9 hours 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:
		$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
//
// 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 days 4 hours ago #2 by rich

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

More
3 days 6 hours 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
3 days 5 hours 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.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to add attachements.
  • Not Allowed: to edit your message.
Time to create page: 0.079 seconds