• Resolved labosuri

    (@labosuri)


    I’ve set a category to Block Read permission for regular subscribers but when searching for text in the post, it is displayed in the search results with the words Uncategorized. When trying to open the post, it gives the “oops, something went wrong” error. I’m pretty sure this once worked, not sure why it’s now being displayed.

    • This topic was modified 1 year, 10 months ago by labosuri.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter labosuri

    (@labosuri)

    I’ll just add that I’ve tried to block categories and specific posts, and even tried blocking a specific user with no success. I also deactivated and activated the plugin.

    • This reply was modified 1 year, 10 months ago by labosuri.
    Plugin Support Riza Maulana Ardiyanto

    (@rizaardiyanto)

    Hi @labosuri

    Can you share screenshot on the Permission setting of the role?

    Thread Starter labosuri

    (@labosuri)

    Here’s a screenshot of the Permission settings for the Subscriber role. The Category that I want to block is Implementation Development.

    https://ibb.co/zxCDV44

    Plugin Support Riza Maulana Ardiyanto

    (@rizaardiyanto)

    I cannot replicate this issue.

    I tried add read block for “B” category:

    I search using subcriber role, and it’s not showing up:

    For comaprison, this is when I search using admin role:

    Let me know if you can replicate this on another site/ fresh WP install.

    Thanks,

    Thread Starter labosuri

    (@labosuri)

    After doing some testing, I figured out that my search plugin (SearchWP) is not affected by the definitions of the Permissions plugin and will display the posts regardless of the Permissions settings. When I deactivate the search plugin, the posts are not displayed in a search.

    After talking to the SearchWP support, they told me that I can add a mod to the search plugin that will define allowed searches according to the post ID. Is there a way to access the post IDs through the Permissions plugin?

    Thread Starter labosuri

    (@labosuri)

    @rizaardiyanto Hi, as I wrote above, I’m trying to find a fix for my issue. Is it possible to get an array of post IDs that are accessible to users?

    Plugin Author Kevin Behrens

    (@kevinb)

    @labosuri Based on the SearchWP documentation on Mods, it would be possible to develop an integration to extend restrictive Permissions settings to SearchWP results. However, this development would be beyond the scope of plugin support. Feel free to contact us through the PublishPress website if you would like to discuss project options. Please also note that it would not be possible to expand SearchWP results by applying out plugins “Enable” permissions.

    Thread Starter labosuri

    (@labosuri)

    Hi Kevin, thanks for your answer. I am in touch with the SearchWP support regarding integrating permissions with the search. The development needed will be their responsibility, not PublishPress. All I’d need from PublishPress is to know whether there is function in your plugin to get the post IDs. Once I have that, I will work with SearchWP to set up the code.

    Plugin Author Kevin Behrens

    (@kevinb)

    All I’d need from PublishPress is to know whether there is function in your plugin to get the post IDs

    @labosuri No, Permissions applies content restrictions directly to WP_Query requests, so SearchWP can simply call:

    $wp_query->query(['fields' => 'ids']);

    … along with whatever other arguments apply to their usage. If calling get_posts() instead, it’s necessary to the argument array to include:

    suppress_filters => false
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Post isn’t hidden’ is closed to new replies.