Permissions for guest not set [RESOLVED]

SwigleSwigle New
edited May 3 in Vanilla 2.8 Help

Hi all,

I've been using vanilla since early 2.x version and haven't updated in a long while.

Because of security issues i'm trying to update my vanilla installation from 2.3.1 to the latest 2.8.3, a big step.

I followed the steps outlined here: https://docs.vanillaforums.com/developer/installation/self-hosting/

I made a copy of the live environment, created a dev DB copy, copied over all the new files, ran upgrade process and did all the things listed in the steps (delete plugins that are in core now).

After that i needed to update my theme because it used old methods and/or old ways of doing things.

After that, the forum worked as intended and looked good. The only thing is, when i logout, i see no categories at all...

It just says "No categories were found.". I of course checked all settings in the backend and most of all the roles and permissions, but all seem OK.

After quite a while of desparation i dived into the core code, all the way to the source bootstrap file which creates the session etc. As far as i can see, the session for an anonymous user gets created blank and then is immediately used for checking rights. The blank session has no rights (of course) and thus, all permission checks for all categories fail and nothing is shown.

As far as i can tell, this is a Vanilla bug, but as nobody else here is complaining about it, it's probably not.

The only possible sollution to this that i found by googling was to update the php version to 7.2+ which i did, but no luck (and can't see what impact this would have on this).

Anyone that can help?


Thnx!

Comments

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... Moderator

    You may have already done these:

    In the Dashbaord, under roles and permissions, make sure that Enable Private Communities hasn't somehow been enabled.

    Check what permissions the role Guest has.

    If they don't look like the culprits, check the DB In GDN_Permission for Role ID 2 and see what values are set to 1.

    Swigle
  • Thanks for your reply!

    Although i could check off all of your suggestions as being set OK on our installation, it did lead me to check and finally find the problem i was having.

    When updating from 2.3.1 to 2.8.3 the roles and permissions are carried over, as it did with my upgrade but there was a change in the way the anonymous users were handled. Because i have both forums now working i can compare them.

    What happened was, that in the old version i had a role called "Guest" that was the default for guests (logically :) ). That role was given to all anonymous visitors when they visited the site.

    After updating to 2.8.3, this role had been altered to not be the default role for guests, but for "unconfirmed". I didn't change anything manually of course but it took me a while (and another look at the permissions page after your suggestion) to see that there was no role assigned to anonymous guests. So i created a new role, gave it the permission to read topics/categories, assigned it the default role for guests (not unconfirmed!) and presto, problem solved.

    So it's weird that the upgrade "broke" the permissions in this way, but the fix was easy.

    Thnx!

    (i've written this out for future google'rs :) )

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... Moderator

    You're welcome, and thank you for the detailed solution.

Sign In or Register to comment.