Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Autologin makes Search engines leave


Guest

Recommended Posts

Hi,

In the past couple of weeks, my SE raing has been dropping, till now it's all gone. I traced the problem to the autologin contribution: if there's no cookie (which SE won't have), they get forwarded to the logoff page

  if($autologon_executed != 'true'){

    $autologon_page = '<html><head><meta http-equiv="Refresh" content="0;URL=' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '"></head><body></body></html>';

    $autologon_link = ((getenv('HTTPS') == 'on') ? 'https://' : 'http://') . $SERVER_NAME . $REQUEST_URI . (strpos($REQUEST_URI, "?") ? '&' : '?') . SID;

The hearders here suck, and that's besides there not being any products on this page. Can someone please briefly explain to me why the user is directed to the logoff page in the first place?

Is there a nkown fix for this issue? for the meantime, I'm disabling the autologon, but I'd like to get it to work properly, so I could reactivate it.

 

Please help,

-Ethan

Link to comment
Share on other sites

I mentioned this problem earlier in a different thread but not everyone seemed to have this problem, i just disabled this contribution in my admin after some extra coding till further notice.

 

I dont have a hurry with this feature, and no i dont have a solution yet other then uninstalling because the SE are your main income source

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

do you have the spider killer installed then do this:

 

 

in includes/application_top.php adjust the code to:

if ($kill_sid != true) {
?if (ALLOW_AUTOLOGON == 'true') { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?// Is Autologon enabled?
? ?if (basename($PHP_SELF) != FILENAME_LOGIN) { ? ? ? ? ? ? ? ? ?// yes
? ? ?if (!tep_session_is_registered('customer_id')) { include('includes/modules/autologon.php'); }
? ?}
?} else {
? ?setcookie("email_address", "", time() - 3600, $cookie_path); ?//no, delete email_address cookie
? ?setcookie("password", "", time() - 3600, $cookie_path); ? ? ? //no, delete password cookie
?} 
}

 

check if you have this definition already in your database ! else skip next line

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Allow AutoLogon', 'ALLOW_AUTOLOGON', 'true', 'Allow registered users to save their login-info into a cookie so they are automatically logged in upon return to the shop.<br><br>Best used on SSL-protected shops.', 1, 10, '2004-09-08 08:12:03', '2004-08-06 17:49:46', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

 

and in includes/modules/autologon.php i've change this:

 

 ?if($autologon_executed != 'true'){
/*
? ?$autologon_page = '<html><head><meta http-equiv="Refresh" content="0;URL=' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '"></head><body></body></html>';
// ? ? $autologon_page = '';
? ?$autologon_link = ((getenv('HTTPS') == 'on') ? 'https://' : 'http://') . $SERVER_NAME . $REQUEST_URI . (strpos($REQUEST_URI, "?") ? '&' : '?') . SID;
? ?$autologon_executed = 'true';
? ?if(!tep_session_is_registered('autologon_link'))
? ? ? ?tep_session_register('autologon_link');
? ?if(!tep_session_is_registered('autologon_executed'))
tep_session_register('autologon_executed');
? ?tep_session_close();
? ?exit($autologon_page);
*/

 

now the spider simulator grabs the data again :)

Edited by Druide

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

I don't have the sID killer installed. Might this have to do with one of the settings in admin-> configuration-> Sessions?

I have everything set to false, except for 'Prevent Spider Sessions', which is true.

 

-Ethan

Link to comment
Share on other sites

  • 4 weeks later...

Hi Ethan,

 

I have had the same problem as you - when no cookie you go to the logoff page on first entry to the site, caused by autolon contrib. I hadnt actually noticed this for a while as ive been testing without deleting cookies for a while. Testing today i saw this and needed to fix before going live.

 

I cannot see why the autolon needs to go to logoff page at all - so i changed the code in autologon.php slightly:

 

from same code snippet you supplied at start of thread
FILENAME_LOGOFF changed to FILENAME_DEFAULT

 

Now the first entry page is the standard default page of the store if you have no cookie - as you woudl expect.

Seems to work fine and doesnt seem to screw anything else up (so far).

 

If you fixed this in some other way then please let me know. The main thread for the autologon contrib has some info but it didnt help much.

Regards

Mark Brindle

Link to comment
Share on other sites

Ah...

just been testing with spider simulators (several) and none of them see the site unless autologon feature is disabled in admin.. so logoff page was a pain, but spiders leaving is caused by autologon trying to set cookies i guess.

in MS2 the sid killer is built in to admin functon- i read some threads on putting in sid killer in with this as well so will try to make some mods that allow both to work..i hope.

Regards

Mark Brindle

Link to comment
Share on other sites

maniac101, it's good to know I'm not the only one with this problem. I think I'm using MS2 (how could I check?).

Let me know if you make any progress, or if you'd like me to do anything to help.

 

-Ethan

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...