Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: caspian1965 on April 16, 2021, 10:51:45 AM

Title: Login issues with microsoft edge
Post by: caspian1965 on April 16, 2021, 10:51:45 AM
Recently got the old forum updated to 2.0.18, thanks for the help with that here.  I'm seeing an issue with microsoft edge now that I haven't been able to figure out.

First of all, I installed an https redirect in the .htaccess file.  The redirect and logging in and staying logged in works perfectly fine in Chrome.

On MS Edge, the url always redirects to https, but I am seeing a double forum header and it is asking to login each time the browser is closed and reopened.  Also, it is acting like https is not enabled on the first login and requires a second login.

Title: Re: Login issues with microsoft edge
Post by: Aleksi "Lex" Kilpinen on April 16, 2021, 10:54:22 AM
I assume you have cleared the browser caches on both browsers and tested again to see which browser is acting funny?
Only asking, because Edge and Chrome are basically the same engine.
Title: Re: Login issues with microsoft edge
Post by: caspian1965 on April 16, 2021, 11:26:48 AM
Same issue clearing out everything on Edge.
Title: Re: Login issues with microsoft edge
Post by: Kindred on April 16, 2021, 11:37:38 AM
ummm...  yeah, you site is broken in EVERY browser for me.

this is your header code...


<div id="top_section" style="text-align:center;>


<h1 class=" forumtitle"="">
<a href="http://www.concoursmustang.com/forum/index.php?PHPSESSID=8cfd53d8a2d857c96512557c1bf3c0c0&amp;"><img src="http://www.concoursmustang.com/forum/Themes/concours_theme/images/smflogo.png" alt="ConcoursMustang Forums"></a>

<img id="upshrink" src="http://www.concoursmustang.com/forum/Themes/concours_theme/images/upshrink.png" alt="*" title="Shrink or expand the header." style="display: none;">
<img id="smflogo" src="http://www.concoursmustang.com/forum/Themes/concours_theme/images/smflogo.png" alt="Concours Mustang Forums" align="center" title="Concours Mustang Forums">
</div>


that's why it's displaying two logos... because it is literally calling for two different logos.

Your styling is broken because your FORUM is calling for http, but the site is https.  FIx your forum URLs.

Title: Re: Login issues with microsoft edge
Post by: caspian1965 on April 16, 2021, 12:24:43 PM
Quote from: Kindred on April 16, 2021, 11:37:38 AM
ummm...  yeah, you site is broken in EVERY browser for me.

this is your header code...

that's why it's displaying two logos... because it is literally calling for two different logos.

Your styling is broken because your FORUM is calling for http, but the site is https.  FIx your forum URLs.

This is from the index.template.php file:


<div id="top_section" style="text-align:center;>


<h1 class="forumtitle">
<a href="', $scripturl, '">', empty
                                      ($context['header_logo_url_html_safe']) ?
                                      $context['forum_name'] : '<img src="' .
                                      $context['header_logo_url_html_safe'] . '" alt="' .
                                      $context['forum_name'] . '" />', '</a>
</h1>';

Title: Re: Login issues with microsoft edge
Post by: shadav on April 16, 2021, 12:30:29 PM
sorry but I am getting the same thing as kindred

are you looking into the correct theme folder?

have you tried using the Repair Settings (https://wiki.simplemachines.org/smf/Repair_settings.php) to help fix the urls and pathways

and if you have hardcoded anything in the theme or css files, you'll need to change those as well from http to https
Title: Re: Login issues with microsoft edge
Post by: caspian1965 on April 16, 2021, 12:51:44 PM
Quote from: shadav on April 16, 2021, 12:30:29 PM
sorry but I am getting the same thing as kindred

are you looking into the correct theme folder?

have you tried using the Repair Settings (https://wiki.simplemachines.org/smf/Repair_settings.php) to help fix the urls and pathways

and if you have hardcoded anything in the theme or css files, you'll need to change those as well from http to https

Thanks, was able to run repair_settings and fixed a lot of issues.

I'm still having to login twice on IE/Edge and it is not keeping the login setting after closing/re-opening the browser   Safari is same issue.  Not sure why I am not seeing it with Chrome.
Title: Re: Login issues with microsoft edge
Post by: shadav on April 16, 2021, 01:14:47 PM
switch to the default theme, does this still happen?

since it appears you are using a custom theme, you may need to update a few things in the theme, if memory serves the login is one thing that changed at some point from 2.0 release to present date...

you can use a program like winmerge and compare files from the default theme folder and files from your custom theme folder and adjust accordingly

or the long way around is to go to : https://custom.simplemachines.org/upgrades/ and click on each version of smf step by step from where you started up until 2.0.18 (click on the name, not the download link) and make sure of the theme/template files what changes were made and make sure that your theme has those changes.
Title: Re: Login issues with microsoft edge
Post by: caspian1965 on April 16, 2021, 01:36:30 PM
Switched it to the default theme.  Still requiring 2 logins in Edge
Title: Re: Login issues with microsoft edge
Post by: Illori on April 16, 2021, 03:27:00 PM
https://wiki.simplemachines.org/smf/Login_error_2.0.14

ideally this fix is no longer required, but can you check that it is applied?
Title: Re: Login issues with microsoft edge
Post by: caspian1965 on April 16, 2021, 03:36:01 PM
Quote from: Illori on April 16, 2021, 03:27:00 PM
https://wiki.simplemachines.org/smf/Login_error_2.0.14

ideally this fix is no longer required, but can you check that it is applied?

I'm switched back to using the default theme and that fix is present in the index.template and login.template php files.
Title: Re: Login issues with microsoft edge
Post by: Kindred on April 16, 2021, 05:14:06 PM
what is the setting for your forum URL in the forum settings?

Does it have a www?
From your screen shot, it suggests it DOES....   and yet your htaccess does not.

Those are different subdomains - so cookies are not valid between them normally --   which is why you need the double login. fix the htaccess to not only force https, but also force www
Title: Re: Login issues with microsoft edge
Post by: caspian1965 on April 16, 2021, 05:58:58 PM
Here's my .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

# php -- BEGIN cPanel-generated handler, do not edit
# Set the "ea-php74" package as the default "PHP" programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php7_module>
   php_flag display_errors Off
   php_value max_execution_time 30
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 256M
   php_value post_max_size 516M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
   php_value upload_max_filesize 512M
   php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors Off
   php_value max_execution_time 30
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 256M
   php_value post_max_size 516M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
   php_value upload_max_filesize 512M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit
Title: Re: Login issues with microsoft edge
Post by: caspian1965 on April 16, 2021, 06:39:37 PM
I downloaded the latest 2.0.18 full package and extracted the default theme directory and copied it up to my server.  Seeing the same behavior, so I guess I can rule out issues with the profile now.  Time to start comparing other files.
Title: Re: Login issues with microsoft edge
Post by: caspian1965 on April 16, 2021, 08:50:15 PM
Think I've narrowed this down:

If going to the base URL for the site:  www.concoursmustang.com, it is asking to login each time

But, if going to:  www.concoursmustang.com/forum/index.php, it is opening without having to login


Will dig into this, but if anyone has any ideas, please share  :) :)
Title: Re: Login issues with microsoft edge
Post by: shadav on April 16, 2021, 09:04:00 PM
um....you have 2 installations on the same site?
Title: Re: Login issues with microsoft edge
Post by: caspian1965 on April 16, 2021, 09:19:48 PM
Quote from: shadav on April 16, 2021, 09:04:00 PM
um....you have 2 installations on the same site?

There is only 1 "forum" directory. 

As an interim solution, I created a redirect at the domain level to point all traffic going to the base url to /forum/index.php and it is working.

Hopefully there is another, better, fix?
Title: Re: Login issues with microsoft edge
Post by: shadav on April 16, 2021, 09:39:50 PM
why not just move the forum to the main folder if you want it to be the site

and well it appears you have 2 forums because if you check the footer they are different
one says 2.0 rc5 and the other says 2.0.18
Title: Re: Login issues with microsoft edge
Post by: caspian1965 on April 16, 2021, 09:50:26 PM
Quote from: shadav on April 16, 2021, 09:39:50 PM
why not just move the forum to the main folder if you want it to be the site

and well it appears you have 2 forums because if you check the footer they are different
one says 2.0 rc5 and the other says 2.0.18

I'm not sure how you're able to see that older version.  With my redirect, any attempt at opening www.concoursmustang.com should go to the /forum/index.php address

I haven't changed anything in over 10 years other than just recently updating from 2.0.5 to 2.0.18
Title: Re: Login issues with microsoft edge
Post by: Ninja ZX-10RR on April 16, 2021, 09:52:35 PM
With the rc5 one having some truckload of security patches not applied :) So that one should go ASAP, really.

As for the how, just... https://www.concoursmustang.com/index.php
Title: Re: Login issues with microsoft edge
Post by: caspian1965 on April 16, 2021, 10:11:30 PM
Quote from: Ninja ZX-10RR on April 16, 2021, 09:52:35 PM
With the rc5 one having some truckload of security patches not applied :) So that one should go ASAP, really.

As for the how, just... https://www.concoursmustang.com/index.php

Ah, thank you.  I have no idea why that file was there, maybe the previous administrator just threw a copy there every time the forum was updated?

Anyway, I removed my redirect and simply created a symbolic link from the root directory to /forum/index.php

Seems to be working fine now.  I suspect this was the problem all along... although I did need to update my .htaccess for https

Thanks