Support from Acquia helps fund testing for Drupal Acquia logo

Comments

catch’s picture

forgot to change tests, let's see how bad this fails.

Dries’s picture

I support this patch (if it doesn't fail badly).

chrishaslam’s picture

Hi

This patch applied successfully to drupal 7 CVS
Hunk #1 succeeded at 1648 (offset -6 lines)

Comments administration now appears as a tab as expected after flushing menu cache

budda’s picture

I don't believe this adds usability. Its removing 'Comments' from the navigation tree and hiding it under 'Content'. Are comments just classed as content now?

If comments are just part of content, i think the description text needs updating so that the /admin/content page lets a new admin know that comments are hidden away in here too.

catch’s picture

@budda - the idea with the d7ux mockup is that all content administration are available from one 'find content' page. Comments are already administered as part of 'content', so I think this makes complete sense.

Even with our current IA I think it makes sense to have these available in one place rather than separate menu items - if I'm trying to delete spam, it's easier to switch between tabs than it is to click up and down a menu level.

I looked at adding comments to the description, but the description either has to assume comments are enabled, or it has to add a module_exists() check for comment.module - neither of these seemed ideal but I'm open to ideas - trying to remember if we have a 'description callback' in the menu system or not. If we do it's an easy fix, otherwise a bit of a pain, but yeah needs to be dealt with.

I opened an issue for moving book administration to site building, RSS publishing settings should probably move to settings, taxonomy could also move to site building. That'd leave us with potentially just a single admin/content for administering content - which IMO is all that should really happen there.

#501472: Move book administration to admin/structure

Bojhan’s picture

This is good because we centralize all content under one hub, however this is on the premise that MDB work gets in and we don't have to mess with the non-prominent garland tabs.

catch’s picture

FileSize
6.71 KB

This passes comment and tracker tests locally.

Status: Needs review » Needs work

The last submitted patch failed testing.

catch’s picture

Status: Needs work » Needs review
FileSize
8.12 KB

Hello, test bot.

catch’s picture

FileSize
8.45 KB

Added hook_menu_alter() for the admin/content/content description.

Dries’s picture

Committed to CVS HEAD. Thanks, catch.

catch’s picture

Status: Needs review » Fixed

Thanks Dries :)

sun’s picture

Priority: Normal » Critical
Status: Fixed » Active

Now someone should create a user that only has privileges to administer comments, but not administer nodes and stuff. The result? No menu item to administer comments.

catch’s picture

So just to make it clear what the problem is you can still visit admin/content/content/comments directly with just that permission, but you don't get the menu item or access to admin/content itself.

There's a couple of options - find a way to keep the top level link even if the only thing available is the tab. Or a patch like #301902: Allow more users to see the node admin page to make admin/content accessible to any user who can do something with content (edit own, edit any, administer comments attached to it) and then make the operations you can do there more granular. I think the latter is the proper fix for this particular issue, the tab one is more general though.

By the way tha_sun and i duked this one out in irc for about an hour and somewhat stalemated.

chx’s picture

check http://drupalbin.com/10179 for a solution that works. I need to fix the description and then it becomes a patch.

chx’s picture

Status: Active » Needs review
FileSize
2.08 KB

I think someone should add a test.

edit: the altered description maybe wants to be 'List and edit site comments and the comment approval queue.'

chx’s picture

FileSize
2.18 KB

I have changed the hardwired access check to menu_get_item checks. A bit slower... but i doubt performance is a penultimate problem on these pages.

catch’s picture

FileSize
4.04 KB

Added a basic test for who sees what where under what circumstances.

Status: Needs review » Needs work

The last submitted patch failed testing.

chx’s picture

Status: Needs work » Needs review
FileSize
9.6 KB

Neither the test nor the patch is perfect but here I offer this way more complete solution.

Dries’s picture

This needs a generic, clean and elegant fix because this pattern is used throughout many of the mockups in the new IA. Talking to Mark and Leisa, they want to fix the use of tabs and switch the model around. Tabs are views, not actions.

I'm a bit worried about:

+  $items['admin/content/%comment_admin'] = array(
+    'title callback' => 'comment_admin_title',
+    // This works because both every string (but '0') is == TRUE.
+    'access callback' => 'comment_admin_to_arg',
+    'options' => array('alter' => TRUE),
+  );

Given that this will be a very common practice, I'm not sure we want to use these 'tricks' as a pattern throughout Drupal. The patch is pretty undocumented so I'm not 100% yet what it does, but can't we auto-promote the next tab to the default tab, if there is no default tab?

Status: Needs review » Needs work

The last submitted patch failed testing.

pwolanin’s picture

While this might function, I stick by the decision to eliminate the "bubbling" behavior of D5. We should fix up the permissions in the hierarchy if we want users of this page to see a link by default.

sun.core’s picture

yay, bump! :) This maps 100% to my predictions for 2010.

sun.core’s picture

Category: task » bug
catch’s picture

Title: Move comment administration to a tab » Make tabs accessible to users without access to default tab
Component: comment.module » menu system
FileSize
40.1 KB

The comment page now looks like this if you have "access content overview" and "administer comments" - this covers the intent of the D7UX IA as best we could and 'access content overview' was necessary for reasons long predating d7ux.

So I'm moving this over generically to the menu system, leave it up to others whether it's a release blocker or not.

sun.core’s picture

This is still critical due to the IA changes we applied to D7. I won't comment on those anymore, but this particular bug makes certain use-case scenarios impossible in D7, which perfectly worked previously.

pwolanin’s picture

Can you summarize the bug/regression or use cases that cannot be accommodated? what is the desired behavior?

sun’s picture

Quite simple:

"A moderator, who moderates comments."

Nothing more, nothing less. No "administer nodes" or whatever permission.

In D6 and below, this user had Administer -> Content management -> Comments.

In D7, this functionality would be expected on Administer -> Content. Technically, by auto-adjusting the default local task according to the user's permissions.

The most recent patch on this issue is quite creative, but is also an aggressive hack. I fail to see how a contributed module would be able to override or extend the local tasks for users that only have the "administer comments" permission.

catch’s picture

Priority: Critical » Normal

That's possible now with 'access content overview' - doesn't give you any extra privileges beyond accessing the content overview, and this only shows you content you have access to. It's also no more clicks to go 'content' => 'comments' than it was to go 'content' => 'comments' => in D6. Hence it's not critical - certainly not compared to some other issues which have recently been bumped back to normal.

sun’s picture

Assigned: Unassigned » sun
sun’s picture

Version: 7.x-dev » 8.x-dev
Assigned: sun » Unassigned

Although badly needed, this is D8 material according to the rules (I had to learn today). It may be backported at a later point in time (though that's unlikely).

Damien Tournoud’s picture

Category: bug » feature

Only feature requests and tasks can be assigned to D8 for now, because the Drupal 8 tree is not opened yet.

Fortunately, this feels more like a feature request to me.

klonos’s picture

Version: 8.x-dev » 9.x-dev

...

catch’s picture

Version: 9.x-dev » 8.1.x-dev
Issue summary: View changes
Status: Needs work » Postponed (maintainer needs more info)
Issue tags: +Needs issue summary update

Not sure what status of this is.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • Dries committed 77c643e on 8.3.x
    - Patch #501466 by catch: move comment administration to a tab.
    
    

  • Dries committed 77c643e on 8.3.x
    - Patch #501466 by catch: move comment administration to a tab.
    
    

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • Dries committed 77c643e on 8.4.x
    - Patch #501466 by catch: move comment administration to a tab.
    
    

  • Dries committed 77c643e on 8.4.x
    - Patch #501466 by catch: move comment administration to a tab.
    
    

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

  • Dries committed 77c643e on 9.1.x
    - Patch #501466 by catch: move comment administration to a tab.
    
    

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Think this probably can be closed as there hasn't been movement on it for 13 years. Plus there seemed to be some commits already made for it. If still a valid feature request though please reopen updating the issue for how this applies for D10 and up.

Thanks!