Problem/Motivation

The protected pages listing builds its Operations column using a generic dropbutton render element. It manually renders the element before inserting the resulting markup into the table cell.

This bypasses Drupal’s normal render pipeline and does not use the operations-specific theme suggestion. Consequently, the operations button may have incorrect or inconsistent markup and styling in current administration themes.

Steps to reproduce

Visit protected pages list.
See button in the Operations column.

Before/After screenshots attached.

Proposed resolution

Use Drupal’s standard operations render element and pass the render array directly to the table cell:

$operations = [
  '#type' => 'operations',
  '#links' => [
    // Operation links.
  ],
];

$row['data'][] = ['data' => $operations];

Remove the manual call to RendererInterface::render() and the controller’s now-unused renderer dependency.

The operations element extends dropbutton, attaches the necessary assets, and provides the appropriate operations-specific theme suggestion. This allows Drupal to handle rendering, attachments, and cacheability metadata correctly.

CommentFileSizeAuthor
AFTER.png123.03 KBoksana-c
BEFORE.png127.84 KBoksana-c
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

oksana-c created an issue. See original summary.

oksana-c’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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