Need to enter login details twice Need to enter login details twice
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Need to enter login details twice

Started by Tonyvic, June 29, 2011, 10:43:07 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Tonyvic

Hi,
I have upgraded my gallery from 1.4 to 1.5.12 and since then when some members (About 25%) enter their login details click 'OK' they are taken back to the login screen again. On entering their details a second time they get logged in ok.
The members with the problem have a range of OS & Browsers so it's not any one in particular.

The Gallery is at http://www.naturist-corner.co.uk/gallery/login.php but it's for registered members only & is not suitable for work computers.

Many thanks for any help.

Tony

Αndré

Please provide a test user account, so we can test it ourselves.

Tonyvic

Andre,
Sorry I posted in the wrong board & thanks for moving it.

Username = Test
Password = cmgteam

Many thanks,
Tony

Αndré

Quote from: Tonyvic on June 29, 2011, 10:43:07 AM
some members (About 25%) enter their login details click 'OK' they are taken back to the login screen again. On entering their details a second time they get logged in ok.
Did you speak to that users or do you just conclude that from the logs? I just tested it three times and get logged in successfully each time. Maybe I'm one of the 75%, but I cannot see anything odd at the first glance.

Tonyvic

I have spoken to my co-administrators and three users who have the problem, they all say the screen refreshes when they click 'ok' but then the 'Username' & 'Password' are gone. Then then add their details again & click 'ok' and this time they get in.
I have three accounts (1 Admin & 2 User) in that Gallery and I have never had that problem, since I upgraded it some months ago.

I upgraded my other Gallery yesterday from 1.4.19 to 1.5.12, now my co-admins report they have the same problem with that one but didn't before.

(I have just looked at the 'access log file, out of 27 recent logins 8 had to do it twice).

Tony

phill104

Does the same occur if you use the default curve theme?
It is a mistake to think you can solve any major problems just with potatoes.

Tonyvic

I have changed to the default 'Curve' theme. The same problem still but I have just learned that when they first go to the gallery's URL they get
QuoteWarning your browser does not accept script's cookies
.
That goes after the first login attempt, or if the page is refreshed before entering their details.
The browsers of those I'm in contact with are set to 'accept third party cookies'!

Tony

Αndré

Not sure if that's a fault of Coppermine, Inspekt or the browser. But I noticed the following:
1.) Clear your cookies (at least the cookies for your domain)
2.) Open login.php directly
3.) You'll see the red cookie warning message, because the Coppermine 'data' cookie doesn't exist (at least the script hasn't found it):
if (!$superCage->cookie->keyExists($CONFIG['cookie_name'] . '_data')) {
    $cookie_warning = <<<EOT
                  <tr>
                      <td colspan="2" align="center" class="tableh2">
                          <span style="color:red"><strong>{$lang_login_php['cookie_warning']}</strong></span>
                      </td>
                  </tr>

EOT;
}

4.) Open login.php a second time, the message disappears, as the cookie exists
5.) Login should work as expected


If you visit your gallery the 'normal' way (i.e. don't use login.php, but index.php), you'll automatically redirected to login.php, but the cookie has already been created. As a workaround tell your users that they have to update their bookmarks to not use login.php.


I'll have a closer look at this soon.

Αndré

Okay this seems to be the usual behavior:
Quote from: http://de2.php.net/manual/en/function.setcookie.phpOnce the cookies have been set, they can be accessed on the next page load

Tonyvic

Many thanks Andre,
Changing the link so members start at index.php & not login.php has corrected the problem for those that have so far tested.
What is still a mystery is that the link to my Gallery has not changed since before the upgrade to 1.5, but this didn't occur before. :-\

Tony
Ps. I consider the problem solved, but cannot find the Icon to tick. Sorry.


Αndré

Quote from: Tonyvic on July 15, 2011, 08:21:15 PM
Ps. I consider the problem solved, but cannot find the Icon to tick. Sorry.

Seems that we have to apply some more changes after the upgrade to SMF2 ;) No worry, that icon is currently not available.

lurkalot

Quote from: Αndré on July 15, 2011, 09:14:00 PM
Seems that we have to apply some more changes after the upgrade to SMF2 ;) No worry, that icon is currently not available.

Sorry to hijack this thread, but it's kind of relevant.    Tonyvic, can you now see the "Topic Solved" button on the bar at the bottom of the page?  I believe it wasn't available to regular users, but it should be now.

If yes, could you click it please.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Tonyvic

I'm afraid not!

Tony

Joe Carver

Quote from: Tonyvic on July 15, 2011, 08:21:15 PM
What is still a mystery is that the link to my Gallery has not changed since before the upgrade to 1.5, but this didn't occur before....
It has been "normal" behavior since 1.5.8 anyway.


To return your user's bookmarks to login.php - edit login.php.
Find as shown above:
<span style="color:red"><strong>{$lang_login_php['cookie_warning']}</strong></span>

Add below it:
<br />
<span style="color:red"><strong><a href="login.php">SET YOUR COOKIE - CLICK HERE</a></strong></span>


Or something similar as you wish.

lurkalot

Quote from: Tonyvic on July 15, 2011, 11:22:43 PM
I'm afraid not!

Tony

It should be on the left hand side at the bottom.  I just logged in on a test account, and it was there, I got this screengrab from it.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Tonyvic

Many thanks Joe.
As I have changed the link in my forum for members to use, I will incorporate your suggestion when next upgrading.

Quote from: lurkalot on July 15, 2011, 11:50:04 PM
It should be on the left hand side at the bottom.  I just logged in on a test account, and it was there, I got this screengrab from it.
Quite right Andre, maybe my eyesite is failing. ;D

Tony

Αndré

Quote from: Tonyvic on July 15, 2011, 11:59:32 PM
Quite right Andre, maybe my eyesite is failing. ;D
Seems so, as the post you answered to was from lurkalot ;D

Tonyvic

Thanks for correcting me Andre. :-[
Sorry lurkalot, must go to Specsavers. 8)

Tony

Αndré

Added workaround for initial issue in svn revision 8228.

Αndré

Fixed possible infinite loop in svn revision 8268.