Restrict Categories breaks Divi 5 loop

I am working on a site that requires access control for different users and categories and most everything has been working well (WordPress makes it very difficult to implement something like this!). Anyway I have run into one issue with Divi 5’s loop builder. I have a module that loops through a single category and it works perfectly unless a post is in multiple categories. If I disable GRC, the post shows, but if it’s active, it does not (for any of the categories). I realize you might consider this a Divi problem, but I can’t be the only one that will run into this. I would really appreciate your help with this. UPDATE: I’m pretty sure GRC just strips any restricted categories from a post when saved using the Divi Builder.


Comments

2 responses to “Restrict Categories breaks Divi 5 loop”

  1. Hi,

    I wanted to clarify based on this:

    “I have a module that loops through a single category and it works perfectly unless a post is in multiple categories. If I disable GRC, the post shows, but if it’s active, it does not (for any of the categories).”

    If a post is in at least one protected category, the post will NOT show up if the user viewing does not belong to the group that protects the category. For example, if you use the Blog module and choose a category under “Included Categories” of that blog, the posts in that category will be shown UNLESS the user viewing it does not belong to the group or groups that protect a particular post or the categories the post belongs to.

    For example, assume we have two categories “Test” and “Protected”. The “Test” category is not protected but the “Protected” category is restricted to members of the “Protected” group (same name for simplicity).

    Assume further that “Post A” belongs to the “Test” category, “Post B” belongs to “Test” and “Protected” category.

    If we use a Blog module on a page and selected the “Test” category under its “Included Categories”, then:

    – a guest will see only “Post A”
    – a registered user who is not a member of the “Protected” group will see only “Post A”
    – a registered user who IS a member of the “Protected” group will see “Post A” and “Post B”

    From what I can tell, this is in line with what you describe and is the expected behavior.

    Regarding this point you mention:

    “I’m pretty sure GRC just strips any restricted categories from a post when saved using the Divi Builder.”

    The restrictions on categories are not removed when editing a post with Divi Builder. The restrictions on a post itself are also maintained. For example, if you assign a post to a restricted category and also restrict the post itself directly with one or more groups, these restrictions are still maintained after entering the Divi Builder, making changes and saving the post. You can see this also after you exit the builder and check the restrictions in the Groups column of the All Posts table.

    I hope this helps further in this case, please let us know if there are any remaining questions or observations, we’re happy to help further!

  2. Hi Terry,

    Welcome to our support forum for Groups and Groups Restrict Categories.

    I tried to replicate what you describe in your ticket using the Blog module in Divi builder, but the result was normal.
    Perhaps it would be better if you share some more details on your setup and specifically the restrictions applied.
    Can you please mention the module name you’re using and the restrictions that apply to the category or post(s) you are trying to display on the frontend?

    Kind regards,
    George