• Resolved WPBot

    (@wpbot)


    Hello,
    Just tried the plugin for the first time but found a serious bug (at least for me) that prevents me from using it.

    I tried to customize the wp-admin menu through the “Admin Menu” module and disable the comments section entirely.
    This hides it from the menu and when I open directly edit-comments.php I get the following error “Sorry, you are not allowed to access this page.” which is exactly what I wanted.

    The problem is that if I go to the posts list and click the comments link which is something like edit-comments.php?comment_status=all&p=1 (edit-comments.php?p=1 also works) I can see the comments page again even though it’s only for a specific post.

    The reason I want this hidden is because it contains the comment authors IP address and email, which shouldn’t be visible to a normal user, no matter whether they’re the post author or not…

    //EDIT:
    Just found in the post edit screen that there’s also the same comments list with IPs and emails… so, even if you fix the bug above that info will still be visible from there.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @wpbot

    I hope you are doing well

    The problem is that if I go to the posts list and click the comments link which is something like edit-comments.php?comment_status=all&p=1 (edit-comments.php?p=1 also works) I can see the comments page again even though it’s only for a specific post.

    I was able to replicate the problem, we reported it to our developers so we can improve this module.

    Are you looking to disable it for any specific user role for example non-admin users?

    //EDIT:
    Just found in the post edit screen that there’s also the same comments list with IPs and emails… so, even if you fix the bug above that info will still be visible from there.

    Could you send a screenshot of the location? Make sure to blur any sensitive information, upload the screenshot on Google drive and share the link.

    We can try to find an alternative way for example some custom Admin CSS.

    Best Regards
    Patrick Freitas

    Thread Starter WPBot

    (@wpbot)

    Hello again and thank you for the reply.

    I was able to replicate the problem, we reported it to our developers so we can improve this module.

    I’ll be waiting for a fix in that case, and as for the second problem I was in a hurry and didn’t describe it properly.

    I was talking about the comments meta box that can be enabled through the “Screen Options” menu while one is editing a post (not sure if that is available in Gutenberg, I’m using the Classic Editor). I’ve created a custom user role and don’t want them to be able to see anything related to comments other than what’s publicly available at the frontend.

    Here are the screenshots you asked for:

    View post on imgur.com

    View post on imgur.com

    Turns out that the metabox in question can be easily disabled through a few lines of code (which could be further improved to be executed only for a specific user role):

    function remove_comments_meta_boxes() {
        remove_meta_box( 'commentsdiv', 'post', 'normal' );
        remove_meta_box( 'commentsdiv', 'page', 'normal' );
    }
    add_action( 'admin_init', 'remove_comments_meta_boxes' );

    Might be a good idea if you include a module that disables metaboxes in the future versions of the plugin. At least so far that’s the only missing thing I can think of.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @wpbot

    Thanks for response and additional explanation!

    The “Admin menu” module of Branda isn’t actually meant to affect any meta boxes. It’s specifically for admin menu and yes – there’s a chance that some “features” (such as e.g. comments, like in this case) may still be available/accessible in some way even after blocking related menu item. The point if this module is specifically to handle admin menu items.

    But yes, I agree such solution with disabling these meta boxes would be very handy and “complementary” to to what can be blocked by admin menu. I don’t think it should be happening “out of the box” with Admin Menu settings but there’s entire “Widgets” section that, I think, would be a good place to put such feature too.

    I’ve already passed this as new feature suggestion to our developers – so hopefully we could add blocking of these meta boxes in future as well.

    Best regards,
    Adam

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @wpbot ,

    We haven’t heard from you for several days now, so it looks like you don’t have more requests.

    Please feel free to re-open this ticket if needed.

    kind regards,
    Kasia

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bug With Comments Hiding’ is closed to new replies.