Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Bug-reports    Topic: Usability Bug: Login time out results in "No User Name" error
Pages: [1]   Go Down
  Print  
Author Topic: Usability Bug: Login time out results in "No User Name" error  (Read 2026 times)
0 Members and 1 Guest are viewing this topic.
aef03
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« on: June 09, 2010, 21:45:10 »

If you are composing a comment and happen to go over the login timeout for your site, clicking to add the comment results in an error that you forgot to provide your name.  However, there is no name field on the screen because of previously logging in before composing the comment.  Would be very confusing to end users.

Thanks,
D.
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: June 10, 2010, 15:23:12 »

You're right. But at this time I don't know how we can determine if guest tries to post comment without entering Name/Email or this is registered user with time out.

We could try next fix:

Open file /components/com_jcomments/jcomments.ajax.php and replace:
Code: (php)
if (empty($values['name'])) {
JCommentsAJAX::showErrorMessage(JText::_('ERROR_EMPTY_NAME'), 'name');
with:
Code: (php)
if (isset($values['userid']) && intval($values['userid']) > 0) {
JCommentsAJAX::showErrorMessage(JText::_('Your session has expired. Please log in again.'));
} else if (empty($values['name'])) {

Open file /components/com_jcomments/jcomments.php and replace:

Code: (php)
}

$result = $tmpl->renderTemplate('tpl_form');
with
Code: (php)
}

$result = $tmpl->renderTemplate('tpl_form');

if ($my->id) {
$result = str_replace('</form>', '<input type="hidden" name="userid" value="'.$my->id.'" /></form>', $result);
}
« Last Edit: June 10, 2010, 15:37:33 by smart » Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Bug-reports    Topic: Usability Bug: Login time out results in "No User Name" error
 
Jump to: