Keyword

Leaving Comments: "The name or email address you typed is already in use!"

  • Renee Johnson
  • Renee Johnson's Avatar Topic Author
  • Offline
  • New Member
More
14 years 4 months ago #83246 by Renee Johnson
I have my comment parameters set to allow everyone to leave a comment (no-one has to register on my site) and as the Administrator I have already left one comment in response to someone.  Now that I am trying to leave a second comment, I get the error: "The name or email address you typed is
already in use!"  I am logged in on the same browser in another tab as the Admin and I am trying to leave my comment with the same username & email address that I used for the first comment, but it won't let me.  Why is it giving this error if my comment settings do not require registration, and when I am trying to comment using the account I already have as the Admin?The other threads about this error message did not ask the same question and seemed unresolved, so I wanted to pose my particular scenario.Thanks!www.sustainableharvest.org

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

More
14 years 4 months ago #83247 by william white
The comments seem to work with unregistered users,
I just put two test comments in with the same email address to the article
Watch Planting Hope:
Of course I did these one at a time.
I do not see a place to registar to test it logged in.

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

  • Renee Johnson
  • Renee Johnson's Avatar Topic Author
  • Offline
  • New Member
More
14 years 4 months ago #83248 by Renee Johnson
Okay, thank you for testing it! I guess it might only be a problem with my registered address, so I'll have to find a work-around for that. Appreciate your time.

William White said:The comments seem to work with unregistered users, I just put two test comments in with the same email address to the article
Watch Planting Hope:
Of course I did these one at a time.
I do not see a place to registar to test it logged in.

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

More
14 years 3 months ago #83249 by Shea Dawson
Hi Renee, Thanks to William I was able to solve this annoying little problem.

You need to modify this file

components/com_k2/models/item.php

Remove the following validation code from around line 629

if ($user->guest){
$db = & JFactory::getDBO();
$query = "SELECT COUNT(*) FROM #__users WHERE name=".$db->Quote($userName)." OR email=".$db->Quote($commentEmail);
$db->setQuery($query);
$result = $db->loadresult();
if ($result>0){
echo JText::_('The name or email address you typed is already in use!');
$mainframe->close();
}

}

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

More
13 years 10 months ago #83250 by Shea Dawson
No problem Bruno, happy that was helpful for you :)

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

More
13 years 10 months ago #83251 by Simon Wells
Shea, Bruno.

Please take care, you are modifying a core file. Consider that when you upgrade k2, this will need to be updated.

Renne,
I posted a comment on this page, please feel free to delete it from the back end if you wish.
One thing I notice on comment submission is that it does not refresh the page, instead, the page refresh just shows a static white page.
This would lead me to think you have a JS conflict.
I am also curious to know which version of K2 is being used by you all as I cant reproduce this on 2.4.1 when logged in.

Simon
K2 Support

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

More
12 years 1 month ago #83252 by rob lazydaze
So is this a k2 bug or is it intentional?

I want my comments open to all (via recapatcha), at least at first anyway. Comments will be moderated. But the K2 code is posted above is a bit of an obstacle to this.

What the problem seemed to be is that I could not use any "name" or email address of a registered user.

Looking at the code in components/com_k2/models/item.php reveals the problem.

Specifically the query in the validation code posted above seems to be the problem.

It checks the name field posted in the comment form against the name field in the Joomla users table. Note that this is not the same as the Joomla username. It is the real name of the user.

I understand that if a commenter posts a comment using an email address that is registered then they should perhaps login first (but that is debatable as well) to prove who they are and prevent impersonations.

However checking if someone's name is the same as an existing user seems a little extreme! e.g. A quick google for "Simon Wells" reveals 524,000 hits. But nobody with the same name as a registered user can leave a comment.

You don't have to edit out all the code. You can just update the query to take the name out of it. I found that worked very well for me. I am just out of step with the K2 code which I don't like.

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

More
12 years 1 month ago #83253 by Lefteris
Hi. Those checks are there for avoiding spoofing. Thanks for your thoughts on this.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum