• Resolved futurion

    (@futurion)


    Dear Mr. Jensen,

    first of all, I must express my greatest gratitude for this amazing plugin, it really does everything I need for my current project.

    However, I found an issue which is only visible with one of the most popular templates (Enfold) and sadly I’m using that one on many pages where I’d also like to use Restrict User Access plugin.

    The issue is the following: As soon as I enable Members-only Access for one particular Category, above all other posts in that Category is displayed another post without title, without image, just some strange link like for instance “http://www.tinza.si/?post_type=condition_group&p=975”. You can check this at my demo page, and current restricted category is “Uncategorized. The link is http://www.tinza.si/category/uncategorized. You’ll see there’s a post withou name on the top with date 12.02.2020. This is the date when I set the restriction.

    I also spotted that date remains there fixed also if days go by. For instance if it’s already 15.02.2020 and the restriction was put in effect on 12.02.2020 then it will still remain 12.02.2020 as date of that non-existing post. This link only appears when Enfold theme is activated and doesn’t appear with any other template I tested. I also tested Avada and some bundled WordPress themes and it works ok with all of them.

    As I said, I’m using Enfold for some reason on most of my pages around and I can’t express how much it would mean to me if you can find and fix the issue with it. I’m of course also willing to donate for a solution to this matter.

    Of course, I’m willing to provide admin access to this page if you’d like to look into it. I’m also posting a screenshot how this thing looks live here:

    For testing, you can also login as “user/user” and go to http://www.tinza.si/category/uncategorized/ and you’ll see the unwanted post at the very top of that category.

    Thank you in advance for your answer and kind regards, Tomaz.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter futurion

    (@futurion)

    I’ll just add a few more words. I don’t know if this means any progress, but I found actually that post (in this case id 975) in wordpress database. It seems this is a post, made by Restrict User Access plugin and it is inserted into table “wp_posts” when a restriction rule is created.

    This post is then displayed with all other posts in Enfold Categories. If I change the status from “publish” to “private”, then it vanishes, but also the restriction isn’t in effect anymore.

    Maybe I’m wrong, but there should be a way to somehow display only post types “post” and not display any other post times, in this case “condition_group” shouldn’t be displayed. Is this maybe doable with a simple code snippet to be put into functions.php or is there maybe a simple fix for your plugin to not display post types “condition_group” anywhere?

    Furthermore, I also noticed there’s not only “condition_group” class assigned. Enfold uses Avia Builder and for instance if I select “Magazine” for displaying blog posts, then another class “av-magazine-type-condition_group” is assigned to this structure automatically when used.

    I’m actually lost here, the more I thin kabout solution, I can’t see it. I simply think Enfold is displaying some post structures that shouldn’t be displayed by default. Can we limit this somehow to only display post types which are not associated with “condition_group” under any circumstance?

    Kind regards and thank you in advance again, Tomaz.

    • This reply was modified 4 years, 3 months ago by futurion.
    • This reply was modified 4 years, 3 months ago by futurion.
    Plugin Author Joachim Jensen

    (@intoxstudio)

    Thank you for reporting this and for providing all the details. And I really appreciate your kind words, I am glad you find the plugin useful!

    Maybe I’m wrong, but there should be a way to somehow display only post types “post” and not display any other post times, in this case “condition_group” shouldn’t be displayed. Is this maybe doable with a simple code snippet to be put into functions.php or is there maybe a simple fix for your plugin to not display post types “condition_group” anywhere?

    You are absolutely correct about this. The issue is that RUA uses taxonomies for conditions, so if you have a database query that fetches all content from a specific taxonomy, regardless of post type, the RUA conditions will be there too.

    I would suggest reaching out to support for Enfold and ask them the question above. Feel free to refer them to this thread.

    Thread Starter futurion

    (@futurion)

    Hello Mr. Jensen,

    thank you for your kind reply. I actually solved the issue after a few hours of research with a simple approach to “unregister” the post_type condition_group. It seems the restriction is still in effect after unregistering the post_type, but that group isn’t displayed anymore anywhere on the site. It does the job, if it’s ok to do it like that, I don’t know. Also I’m not sure if this fix should be implemented into the plugin or into the template, what do you think?

    // hide post_type condition_group for restrict user access plugin
    function my_delete_post_type(){
    unregister_post_type(‘condition_group’);
    }
    add_action(‘init’,’my_delete_post_type’, 100);

    P.S. The priority 100 is crucial for this to work, don’t ask me why.

    • This reply was modified 4 years, 3 months ago by futurion.
    • This reply was modified 4 years, 3 months ago by futurion.
    Thread Starter futurion

    (@futurion)

    Hello Mr. Jensen,

    I posted the issue in the Enfold support forum as well and it’s available here:

    https://kriesi.at/support/topic/hide-post_type-condition_group-from-all-categories/

    I told them about possible solution and I also believe that solution has to be integrated somehow to be available for everyone out-of-the-box. I’m just not sure if that’s something that has to be done in the Enfold theme or in the plugin. Would you be able to communicate with them maybe and talk about possible solutions?

    Kind regards again and thank you for your help, Tomaz.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Issues with restricted content and Enfold template’ is closed to new replies.