Offshoot of #273853: Toggle Disqus Comments.

Basically what is happening in our particular use case is that Drupal core comments are used on one node content type, Disqus is being used on others, and some with no comments at all. The referenced issue removes reliance on the comment module by adding a new "toggle disqus" permission, but introduces user interface issues when both Comment and Disqus are used. A blank comment settings vertical tab form appears for users without "Administer comments and comment settings" permission when the Disqus module is enabled.

On our project I temporarily commented out line 593 of disqus.module until I get a little time to work on a solution that works for all use cases: Disqus standalone and Disqus+Comments.

Comments

Sborsody’s picture

Title: Respect "Administer comments and comment settings" permission » Hide comment settings fieldset for users without adequate permission
Status: Active » Needs review
StatusFileSize
new1.55 KB

This seems to handle the different use cases and permission combos better.

jwilson3’s picture

Assigned: Sborsody » Unassigned
Status: Needs review » Reviewed & tested by the community

RTBC. Works as advertised and would be a beneficial addition to the codebase to fix this usability bug.

robloach’s picture

How about....

          $form['comment_settings']['#access'] = user_access('toggle disqus comments');
jwilson3’s picture

Status: Reviewed & tested by the community » Needs work

Rob has a valid point. Should be a trivial re-roll, for which i dont have time atm.

jerenus’s picture

How about this.

jerenus’s picture

Status: Needs work » Needs review
jwilson3’s picture

Any reason you left out the clear comments that were added by the previous patch?

jerenus’s picture

I just don't know it is necessary. New patch with the clear comments.

jwilson3’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

robloach’s picture

Status: Reviewed & tested by the community » Fixed
Sborsody’s picture

I will try to test this over the weekend. Thanks everyone.

Sborsody’s picture

Looks like it works for our use case. Thanks everyone!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

expands on description, adds issue reference

  • Commit dbc1381 on 7.x-1.x, 8.x-1.x by RobLoach:
    Issue #1737598 by Jerenus, Sborsody: Fixed Hide comment settings...