Can't Login when "Allow Guests to Browse" is disabled

Started by niddnet, November 24, 2022, 10:49:20 AM

Previous topic - Next topic

niddnet

Hi All,

Very strange issue here.

We want our forum non-browsable unless you're logged in so, accordingly, I set the option in Admin Features.

However, now, when we try to login via the Login Screen presented (attached), we receive the 'Token Verification Failed' error.  NB: we do NOT get that error any other time. 
You cannot view this attachment.

Logging in via the little floating toolbar at the top, and the popup window works fine.
You cannot view this attachment.

If I re-enable Guest Browsing, and navigate to site/index.php?action=login it also works fine.
You cannot view this attachment.

Now the very weird part:

One guy I've tested with don't have this problem at all - he's an Apple user (I'm Windows / Android).  Also, if I use Firefox rather than Edge or Chrome, I also don't have this problem.

I have tried in Private Browsing, I've cleared cookies - in fact, I've spun up a brand-new clean install of Windows and been able to replicate the problem every time.

However, I did a totally clean-install of the Forum on a different domain / host today, installed the same theme etc. and this problem does NOT occur on there.

If anyone would like to prod or test, please send me a PM and I will provide you links to both sites.

The original site was installed at 2.1.2 and upgraded via the Admin panel to 2.1.3 today.  The new / test site was installed directly at 2.1.3.

We are using the RadicalRed theme, however the behaviour is present even with the Default Theme and/or with RadicalRed deleted.

I've seen a lot of tickets re. the "Token Verification Failed" error in OTHER places (like jumping around Admin pages etc.) - but that is NOT this - as I mentioned, once logged in, I can do everything exactly as I'd expect - it's ONLY the first login that's a problem.

If anyone can help out here, please drop me a line.  I'm setting this up for a non-profit/charity so want it to be as easy and seamless as possible.

Thank you for your time and assistance,


Nidd


mgcAna

Do you have any mods installed, can you share list ?
Also, see anything in logs for smf ?

niddnet

Thanks for the reply so quick.

No mods - the "main" forum was Vanilla 2.1.2, RadicalRed Theme, Upgrade to 2.1.3.

The "rest" forum is direct install Vanilla 2.1.3.

All have been installed via Softaculous package manager.

When you say logs, which logs are you suggesting I check?  If you mean the SMF Forum error log, then that's empty.  But I'm more than happy to check some others if you tell me where :)

Also - as mentioned, happy to provide actual URL so you can check it for yourself if you like.  There's no data in the forum yet so no issue in creating add'l logins etc. if needed.

I'm REALLY grateful for any help; I've worked in the IT industry since.... a long time.... but just never got my head around coding, and the ol' brain finds it hard to take things in these days!

N

niddnet

Just as a further update:

I have just done a bunch of delete/reinstalls and fresh installs on brand new domains.  In all cases this time, it is *ONLY* the vanilla 2.1.3 - no addons, no themes, nothing - straight from the install.

I wondered, maybe it's because I'm installing in a subdomain.

So I created a new subdomain (off a different TLD) - no issue, it works fine.

So I deleted my "main" install (again) completely.
Then went into the site folders via WinSCP and deleted EVERYTHING in there.
Then I cleared all cookies, cache, etc on my test machines.
Then I did another new re-install into the subdomain.

The problem is still there!

So I figured, okay, I'll create a whole new subdomain in the MAIN domain.
Created subdomain, updated DNS, updated SSL certs... all good.  Installed SMF in brand new sub... Token Verification Error!

So, by process of elimination:

- It is ONLY happening in the MAIN domain, and not other domains
- It happens in MULTIPLE sub-domains in the MAIN domain, and NOT in subdomains in other domains.
- Even WHEN it happens, it seems only to happen on Windows devices in Chrome or Edge.

So frustrating!  It works FINE in 99.99% of cases, except the one I need it to work in :D

At this stage, I'm considering hosting in a separate domain, but not sure the team will take that.

N


Steve

Quote from: niddnet on November 25, 2022, 03:11:12 AMAll have been installed via Softaculous package manager.
Never use a third-party updater to update your forum. They almost always cause odd problems.

As for your issue, I'll have to turn this over to someone more familiar with what you're talking about than I.
Please do not PM me for support.

niddnet

Hi Steve

Softaculous only did the initial installs - I updated from within SMF.

For absolute clarification, the Softaculous installs on my test domain works FINE.  It's only in my main domain.

Both domains are with the same hosting provider, and are setup with the identical hosting package.

BUT - I did start wondering about the Softaculous system.

So - I went into WinSCP, cleared out the subdomain folder in my 'main' domain.
I went into my domain control panel, and setup a brand new database and database user.
I downloaded 2.1.3 directly from SMF website, extracted and copied to my subdomain.
I ran the installer with no problems at all.

And as soon as I remove the checkmark from "Allow Guests to Browse" - I am back with the error again!!

So that's a completely manual, fresh install, as per the SMF installation guide online.  No add-ons, no themes.  In fact, no content - it's a brand new, empty forum, just with Guest Browsing turned Off.

it works in Firefox; but not in Chromium type browsers.
it works in other domains in Chromium/Chrome/Edge, but NOT a subdomain of my website

it HAS to be something, somewhere somehow, in the hosting configuration, but I'll be damned if I can find it!

Hopefully someone can provide some insight, or at least help me diagnose WHERE it's falling down?

N



m4z

Thanks for the detailed descriptions, these are very helpful.

Could it be caching? Do you have (in-SMF) caching enabled? If so, what kind? Or are you behind a caching provider like f.e. CloudFlare?

When setting up your test forums, do you have a list of all changed settings of your main forum to make sure they're all set identically in the test forums?


Quote from: niddnet on November 25, 2022, 05:33:54 AMSo I figured, okay, I'll create a whole new subdomain in the MAIN domain.
Created subdomain, updated DNS, updated SSL certs... all good.  Installed SMF in brand new sub... Token Verification Error!

So, by process of elimination:

- It is ONLY happening in the MAIN domain, and not other domains
- It happens in MULTIPLE sub-domains in the MAIN domain, and NOT in subdomains in other domains.
- Even WHEN it happens, it seems only to happen on Windows devices in Chrome or Edge.

What are your cookie settings in all of the subdomains of the host with the problematic forum?
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!
<werbung>Meine Freundin hat ihr erstes Buch veröffentlicht!</werbung>

Advertisement: