Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Issue with Forum logging us out when clicking on links.

DaniM53DaniM53 New
edited March 2014 in Vanilla 2.0 - 2.8

HI, We are currently using Version 2.0.18.10 and are experiencing an issue. I've scoured the forum and found a few similar posts but none with solutions. WYSIWYG (CLEditor) is the only plugin we have enabled.

In Chrome, if we try to post it works fine, BUT if we click on any links (Navigation links or any other hyperlink) within the forum we get logged out immediately and have to log back in. This seems to come and go and I can't recreate it on a dime. It is random and happens as soon as we log in, not after an hour or so.

We do have several old forums that are close down but still on our server.

Our forum expert believes it's related to hosting killing the cookie.

Our host believes it's related to vanilla cookie settings. There are no errors in the host logs. We turned off server caching to see if it fixed it. Issue came back.

and I'm caught in the middle without a solution

I found another post that is similar to this and the person asks about this:

what is the value for

$Configuration['Garden']['Cookie']['Domain']

ours is currently blank in /conf/config.php

I'm a lower level programmer, not much into php and more of the front end admin. Any ideas? If you need anything else please let me know.

Tagged:

Comments

  • DaniM53DaniM53 New
    edited March 2014

    Banging my head on a desk at the moment haha

  • peregrineperegrine MVP
    edited March 2014

    you need to go into conifg.php and change your cookie if you have multiple forums loaded in browser

    each forum should have a different cookie.

    $Configuration['Garden']['Cookie']['Name'] = 'myName';

    also totally refresh your browser, clear out your cache folder of ini files, and run /utiluity/update

    those three things clear up lots of mysterious problems.

    as far as the domain setting for the cookie - it is the domain name of your site.

    check your browser to see if it saves cookies - you can check cookies in web developer tools. and verify the expiration dates and times.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Hi @Peregrine thanks, we do have all forums set with different cookie names ( a mistake we made last year ) so that part I know is all good. I'll have my team do the other things you mentioned and see if we can clear it up. It's happening several of us around the globe.

    Ohh good idea on checking the expiration date/time I'll see. thank you!

  • $Configuration['Garden']['Cookie']['Domain'] = '.yourdomain.com';

    note the . at he beginning if you do not have that there it will treat the www. address differently than without and all sub-domains.

    grep is your friend.

  • businessdadbusinessdad Stealth contributor MVP
    edited March 2014

    I'm the one who configured the affected forum and set all the cookie parameters (name, domain, path, salt and everything else), and the issue persists no matter what I tried. However, cloning the forum exactly, data and files, on several different servers, solved it. I took it "as is" on a shared server, two independent VPS and several local virtual machines, ensuring that the DNS pointed to them using the hosts file, and everything worked perfectly out of the box. That's why I came to the conclusion that the server itself must have something to do with it, although I cannot think of what it could be.

    Update: the affected site seems to use a reverse proxy, which may or may not be the cause (it's still a caching mechanism, after all). All the test sites that I used and worked normally were accessed directly, no proxy/caching in place.

  • businessdadbusinessdad Stealth contributor MVP

    Some technical details, for the techies out there.

    During my testing, I added tons of logging to the affected site, and I found out the following:

    • Cookie is always set correctly on login, with expiration 30 days later.
    • After a random amount of page loads, cookie is no longer passed to Vanilla. I put a check before anything is actually done, to see the cookie content, and, suddenly, an empty value is returned. Vanilla then sees that the cookie is empty and unsets it, so it gets deleted from the browser.
    • At next page load, the cookie is gone, and the session with it.

    My suspicion still remains on the reverse proxy, as I think that it could be the one "forgetting" to forward the cookie to the site, hence causing all the trouble.

Sign In or Register to comment.