Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Login weirdness

Quote Reply
Login weirdness
When a new user successfully signs up for an account, the get a message that states:

"You have now successfully registered. You may now login."

The problem is:
1) They ARE logged in.
2) The login/register is still in the top right corner
(it should say logout and have logout icon)

Switching to any other page corrects the "login/logout" text and icon.

Is there a simple fix for this behavior?

Thanks,
Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Login weirdness In reply to
Take a look at the 3.0.0 to 3.0.1 template diffs, both your issues have been fixed (one being remove the link since you're already logged in, and the 2nd one being the javascript to change the link).

Adrian
Quote Reply
Re: [brewt] Login weirdness In reply to
Well I logged in to dowload area and redownloaded glinks-3.0.1.tar.gz

I unstuffed the file and unstuffed the .dat file.
I replaced (on my server) the entire luna template set with the files from this archive.

I have read and re-read the 3.0.0 to 3.0.1 template diffs.
There is nothing in there to indicate that any fix has been made to "signup_success.html"
There is also no reference to anything java.

The code in
"signup_success.html" is as follows:
(brand new copy from .dat file)
Code:
<p>
<%~if Validation%>
Thanks for signing up, an e-mail has been sent to you with a
validation code. Once you receive it, you'll need to enter a <a
href="<%config.db_cgi_url%>/user.cgi?validate=1">validation
code</a>
<%~else%>
You have now successfully registered. You may now <a
href="<%config.db_cgi_url%>/user.cgi?Username=<%Username%>">log
in</a>.
<%~endif%>
</p>

I do see there were changes to "add_success.html", but not signup_success
-<%~if AutoValidate%>
+<%~if config.build_auto_validate%>
So, do I have the latest version of this luna template
"signup_success.html" (snippet above)?
I can just delete the link like you said, but the login/logout icon is still wrong.
Where is this javascript?

Sorry if I missed something, but I just don't see any fix :-)

Chris



RGB World, Inc. - Software &amp; Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Login weirdness In reply to
In Reply To:
There is nothing in there to indicate that any fix has been made to "signup_success.html"
Sorry about that, I guess those changes were made before 3.0 then. Take a look at the 2.99.1 to 3.0 diffs.

Adrian
Quote Reply
Re: [brewt] Login weirdness In reply to
According to 2.99.0 -> 2.99.1 luna template set diff. There are only wrapper differences.
When you actually get to the content, the diffs show this:

Code:
<div class="crumb"><%Links::Utils::format_title($main_title_loop, separator => $crumb_separator, no_escape_separator => $no_escape_crumb_separator, include_home => 1, link_type => 2)%></div>
<h2>Successful Sign Up</h2>
@@ -29,8 +28,11 @@
<%~endif%>
</p>


The area I am trying to check is where the @@ symbols are.
I have
Code:
<p>
<%~if Validation%>
Thanks for signing up, an e-mail has been sent to you with a validation code. Once you receive it, you'll need to enter a <a href="<%config.db_cgi_url%>/user.cgi?validate=1">validation code</a>
<%~else%>
You have now successfully registered. You may now <a href="<%config.db_cgi_url%>/user.cgi?Username=<%Username%>">log in</a>.
<%~endif%>
</p>


I am not overriding this template (signup_success.html)

So lets review...
When a new user successfully signs up for an account, the get a message that states:

"You have now successfully registered. You may now login."

The problem is:
1) They ARE logged in.
2) The login/register is still in the top right corner
(it should say logout and have logout icon)

Switching to any other page corrects the "login/logout" text and icon.

Your reply
Quote:
both your issues have been fixed (one being remove the link since you're already logged in, and the 2nd one being the javascript to change the link).

I can just delete the link like you said, but the login/logout icon is still wrong.
Where is this javascript?

I have re-uploaded the entire luna template set from the installer
glinks-3.0.1.tar.gz
I also re-uploaded utils.js to static directory.

I have made sure(again) that all changes to templates (that I am overriding) have been updated.

Now I am a little concerned that the templates out of
glinks-3.0.1.tar.gz are completely updated.

As far as i am concerned this is still broke.

Chris

UPDATE
I find this in 2.99.1 -> 3.0 for
include_common_head.html
Quote:
+<%~-- If your site is statically built, then the login status will always say 'Login/Register'. This javascript replaces it with 'Logout' if the user is logged in. --~%>

Because my site is dynamically built, I deleted the java script from include_common_head.html
So, either the comment is wrong? or it is still a bug in dynamically generated sites.

FINAL RESULTS
I put the java script back in and it fixes the icon.

So...
1) the comment is wrong. The javascript is needed even for dynamic sites.
fyi, I am using rewrite rules to look static
2) The template "signup_success.html" should be updated without the "login" link.
fyi, I was not overriding this template. now I have to.

Chris
RGB World, Inc. - Software &amp; Web Development.
rgbworld.com

Last edited by:

rgbworld: May 8, 2005, 1:10 AM
Quote Reply
Re: [rgbworld] Login weirdness In reply to
Oh I see, sorry, but I'm confusing the issue with another issue. Here's a patch to Links/User/Login.pm:
Code:
--- Login.pm 22 Mar 2005 08:21:07 -0000 1.18
+++ Login.pm 8 May 2005 09:52:38 -0000
@@ -181,6 +181,7 @@
}
else {
my $results = Links::Authenticate::auth('create_session', { Username => $user->{Username} });
+ $USER = Links::Authenticate::auth('get_user', { Username => $user->{Username}, Password => $user->{Password}, auto_create => 1 });
print $IN->header();
print Links::SiteHTML::display('signup_success', { %$user, main_title_loop => $mtl });
}

This combined with removing the link from the signup_success.html template should fix the incorrect login/logout link issue.

Adrian
Quote Reply
Re: [rgbworld] Login weirdness In reply to
Read this post on how to read the diffs.

Adrian
Quote Reply
Re: [brewt] Login weirdness In reply to
Great thanks.

The patch fixed the login icon.
I removed the login link from "signup_success.html"

FYI, I was now able to remove the javascript from "include_common_head.html" because my site is dynamically generated.

If the template is updated, I will have no need to override this template

Will this patch and signup_success.html be updated in the next update?

Thanks again,
Chris
RGB World, Inc. - Software &amp; Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Login weirdness In reply to
Yes it will be.

PS: that javascript won't show up when you're in dynamic mode anyways.

Adrian
Quote Reply
Re: [brewt] Login weirdness In reply to
I does show. I'll stick with the deleted version.

Quote:
PS: that javascript won't show up when you're in dynamic mode anyways.

Chris

RGB World, Inc. - Software &amp; Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Login weirdness In reply to
If you are truly in dynamic mode (ie. d=1), then it will not show because of the <%if not d ...%> template code.

Adrian
Quote Reply
Re: [brewt] Login weirdness In reply to
I am truely in dynamic mode, but I am using rewrite for static look.
I figured that's what was going on, so I deleted javascript from template.

It works just fine. The login/logout works fine either way

Chris
RGB World, Inc. - Software &amp; Web Development.
rgbworld.com