Side pannel not showing a category despite specified in Default navigation menu categories

I configured 2 categories:

  • one category School_A which is private for a specific group_School_A
  • one category Support which is private for Trust Level 0 users

I configure the setting Default navigation menu categories to have School_Aand Supportbut on the side pannel, only School_A is appearing for users belonging to group_School_A.

To access Supportwe still have to click on All categories and select Support.

If I configured the Support category to be private for group_School_A, I still have the same issue.

Can someone perhaps help understand what I am doing wrong ?

Thanks

How did you test that? Did you create a new test user? Users can also customize the categories shown in their sidebar. This can prevent a new default from being applied to existing users. Is is possible for users to add the category manually?

Indeed that is perhaps the issue.

I am testing with a dummy user but created before I made the change.

If I click on the pencil button for the Category, I can see both categories and the Support unselected.

But the question then would be how to apply the new setting to the existing users ?
Is there an API that I can use ?
The users created their account one week ago (so not much time to customize) and I only realized today the issue with the sidebar and the category not visible.
If I ask the users to perform an operation, most will not understand and the others will ignore…

Thanks a lot !

When you change the site setting, you can choose whether you want to enforce it for existing users.

So you should be able to remove support and school_a from the setting, save without applying that for existing users. Then you wait a few minutes and add them again. This time, apply the change to existing users. (Don’t be scared because of the count, it might be wrong because you are adding more than one category)

There is a guide here, but it is focused on overriding any customizations, enforcing the same sidebar for everyone: How to set the same sidebar categories for all the users.

I think I have already applied it to existing users.

But I tried again:

  • when I remove all categories from default navigation menu categories, it is prompting to apply it to existing users. I reply No.
  • I waited a few minutes
  • I add them again, but this time there is no prompting to apply to existing users.
  • I checked the sidebar, and the Supportis still unchecked (but present)
  • I tried adding a dummy category to default navigation menu categories to force the prompt to apply to existing users. This time I got the prompt and I replied Yes.
  • I checked again the sidebar and the Support is still unchecked.

So there is some issue wih the apply this change historicallyit seems ?

Update: I re-tried by emptying the default navigation menu categories, applying to existing users, wait a few minutes, add the categories again and applying it again to existing users, and this time it works !

Thanks a lot

Hmm. It make sense that the option is not offered if all users already have the category in their sidebar.

You could apply the step of removing the category to everyone. After that adding should trigger the “apply to existing users” modal. But this might be confusing for users currently using the forum.

You can also check the current config using data explorer. This query allows you to select a category and a group and returns for every group member if they have the category in their sidebar

-- [params]
-- group_id :group
-- category_id :category

SELECT
    u.id AS user_id,
    CASE WHEN sl.id IS NULL THEN 'No' ELSE 'Yes' END AS category_added_to_sidebar
FROM users u
JOIN group_users gu ON gu.user_id = u.id
LEFT JOIN sidebar_section_links sl
    ON sl.user_id = u.id
    AND sl.linkable_type = 'Category'
    AND sl.linkable_id = :category
WHERE gu.group_id = :group
ORDER BY category_added_to_sidebar ASC

The result looks like this

I have only a few users who recently joined, so it was not an issue to remove the categories and apply them again (pretty sure nobody had the time to customize the side pannel).

Now it seems to work, thanks a lot for your support !