- Posts: 127
- Thank you received: 4
Kunena 7.0.2 Released
The Kunena team has announce the arrival of Kunena 7.0.2 [K 7.0.2] in stable which is now available for download as a native Joomla extension for J! 5.3.x/5.4.x/6.0.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
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.
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 Kunena Discuss 3.0 Plugin does not allow guests to be the first to post article comments.
12 years 9 months ago #144428
by nemmar
Kunena Discuss 3.0 Plugin does not allow guests to be the first to post article comments. was created by nemmar
Hi,
The same bug from K2.0 Discuss plugin is still in K3.0 Discuss plugin. I just installed K3.0 updates to my site forum and tested this out. If Joomla cache is enabled a Guest cannot post a comment in the K Discuss plugin (or cannot be the FIRST to post a comment in an article).
You can see the support forum posts and details of the github.com bug report links below:
github.com/Kunena/Kunena-Addons/issues/120
www.kunena.org/forum/K-2-0-Kunena-Discus...es-to-make-a-comment
www.kunena.org/forum/K-2-0-Kunena-Discus...es-to-make-a-comment
Can anyone let me know how to notify the GitHub developer working on this?
I know the Kunena devs volunteer to work on Kunena but is there any way someone can take care of this bug since it's about a year old now from K2.0-3.0?
Let me know if you need my K3.0 Config Report with this post but I don't think it matters with this issue since it seems like a Joomla cache and K Discuss conflict.
Thanks!
The same bug from K2.0 Discuss plugin is still in K3.0 Discuss plugin. I just installed K3.0 updates to my site forum and tested this out. If Joomla cache is enabled a Guest cannot post a comment in the K Discuss plugin (or cannot be the FIRST to post a comment in an article).
You can see the support forum posts and details of the github.com bug report links below:
github.com/Kunena/Kunena-Addons/issues/120
www.kunena.org/forum/K-2-0-Kunena-Discus...es-to-make-a-comment
www.kunena.org/forum/K-2-0-Kunena-Discus...es-to-make-a-comment
Can anyone let me know how to notify the GitHub developer working on this?
I know the Kunena devs volunteer to work on Kunena but is there any way someone can take care of this bug since it's about a year old now from K2.0-3.0?
Let me know if you need my K3.0 Config Report with this post but I don't think it matters with this issue since it seems like a Joomla cache and K Discuss conflict.
Thanks!
Please Log in or Create an account to join the conversation.
12 years 9 months ago - 12 years 9 months ago #144459
by gray
www.justPHP.net - Custom coding for Joomla!
Replied by gray on topic Kunena Discuss 3.0 Plugin does not allow guests to be the first to post article comments.
Found the reason and quick solution.
The error
Fatal error: Call to a member function newReply() on a non-object in ...\plugins\content\kunenadiscuss\kunenadiscuss.php
appears with disabled cache, but with enabled option "Require email".
Bug description:
1) function createTopic() in the kunenadiscuss.php tries to create first topic (aka created by robot) and it does not pass any email in params
If you check replyTopic() in the same file, you'll see that params already contain email.
2) Plugin should create 2 messages - one automatic (by robot) which has no email(!) and 2nd - with email entered by user.
3) When the code tries to save messages with the help of KunenaForumMessage class, it goes through check which cannot be passed by 1st message (robot).
My quick solution:
in protected function createTopic($row, KunenaForumCategory $category, $subject) from kunenadiscuss.php find
and replace with
Note:
That's the solution I could found in a limited time frame. More beautiful solution would be adding one more condition to the statement
which should check if it's a topic started by the plugin - and do not require the email at all. Can anyone propose such a check? Or a better solution?
The error
Fatal error: Call to a member function newReply() on a non-object in ...\plugins\content\kunenadiscuss\kunenadiscuss.php
appears with disabled cache, but with enabled option "Require email".
Bug description:
1) function createTopic() in the kunenadiscuss.php tries to create first topic (aka created by robot) and it does not pass any email in params
Code:
$params = array(
'subject' => $subject,
'message' => $contents,
);
2) Plugin should create 2 messages - one automatic (by robot) which has no email(!) and 2nd - with email entered by user.
3) When the code tries to save messages with the help of KunenaForumMessage class, it goes through check which cannot be passed by 1st message (robot).
Code:
// Check email address
$this->email = trim($this->email);
if ($this->email) {
// Email address must be valid
if (! JMailHelper::isEmailAddress ( $this->email )) {
$this->setError ( JText::sprintf ( 'COM_KUNENA_LIB_MESSAGE_ERROR_EMAIL_INVALID' ) );
return false;
}
} else if (! KunenaUserHelper::getMyself()->exists() && KunenaFactory::getConfig()->askemail) {
$this->setError ( JText::_ ( 'COM_KUNENA_LIB_MESSAGE_ERROR_EMAIL_EMPTY' ) );
return false;
}
My quick solution:
in protected function createTopic($row, KunenaForumCategory $category, $subject) from kunenadiscuss.php find
Code:
$params = array(
'subject' => $subject,
'message' => $contents,
);
$safefields = array(
'category_id' => intval($category->id)
);
list ($topic, $message) = $category->newTopic($params, $this->params->get ( 'topic_owner', $row->created_by ), $safefields);
Code:
// hack by Gray <www.justphp.net>
$topic_owner = $this->params->get( 'topic_owner', $row->created_by ); // save the ID for later use
$user = KunenaUserHelper::get( $topic_owner );
$email = $user->email; // get real email
$params = array(
'email' => $email, // we need to pass email of the topic starter (robot) when 'Require E-mail' option is enabled
'subject' => $subject,
'message' => $contents,
);
$safefields = array(
'category_id' => intval( $category->id )
);
list( $topic, $message ) = $category->newTopic( $params, $topic_owner, $safefields );
// end hack
Note:
That's the solution I could found in a limited time frame. More beautiful solution would be adding one more condition to the statement
Code:
} else if (! KunenaUserHelper::getMyself()->exists() && KunenaFactory::getConfig()->askemail) {
$this->setError ( JText::_ ( 'COM_KUNENA_LIB_MESSAGE_ERROR_EMAIL_EMPTY' ) );
return false;
}
www.justPHP.net - Custom coding for Joomla!
Last edit: 12 years 9 months ago by gray. Reason: corrected code
Please Log in or Create an account to join the conversation.
12 years 8 months ago #145019
by nemmar
Replied by nemmar on topic Kunena Discuss 3.0 Plugin does not allow guests to be the first to post article comments.
Does anyone know when the Discuss Plugin will have the bug fixed?
That would be a better solution than making code changes.
That would be a better solution than making code changes.
Please Log in or Create an account to join the conversation.
12 years 6 months ago #147804
by nemmar
Replied by nemmar on topic Kunena Discuss 3.0.1 Plugin does not allow guests to be the first to post article comments.
Hi,
I installed the Kunena Discuss 3.0.1 Plugin with the K3.0.2 forum update. However, it still does not allow guests to be the first to post article comments.
Can anyone tell me if this Discuss plugin will ever have this bug fixed, or is it a minor bug that the Kunena developers don't have time to fix? I've posted a number of times about this bug since the problem started in K2.0 Discuss plugin but it never seems to get fixed. Is no one else having problems with this bug on their sites?
Thanks for any info.
I installed the Kunena Discuss 3.0.1 Plugin with the K3.0.2 forum update. However, it still does not allow guests to be the first to post article comments.
Can anyone tell me if this Discuss plugin will ever have this bug fixed, or is it a minor bug that the Kunena developers don't have time to fix? I've posted a number of times about this bug since the problem started in K2.0 Discuss plugin but it never seems to get fixed. Is no one else having problems with this bug on their sites?
Thanks for any info.
Please Log in or Create an account to join the conversation.
12 years 6 months ago #147807
by awinkler
Replied by awinkler on topic Kunena Discuss 3.0 Plugin does not allow guests to be the first to post article comments.
I have the same problem. The discuss part doesn't get displayed after the text, not even the header.
Please Log in or Create an account to join the conversation.
12 years 6 months ago #147845
by gray
www.justPHP.net - Custom coding for Joomla!
Replied by gray on topic Kunena Discuss 3.0 Plugin does not allow guests to be the first to post article comments.
I've published the solution (see above). Not sure it's the best one, as I didn't get any feedback from the core team.
PS. Can add this hack to the newest release, but don't know how.
PS. Can add this hack to the newest release, but don't know how.
www.justPHP.net - Custom coding for Joomla!
Please Log in or Create an account to join the conversation.
Time to create page: 0.278 seconds