Problem/Motivation

The black toolbar is broken. There is an empty toolbar item between "Shortcuts" and "admin".

Proposed resolution

Check if this is the problem and solve it.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sasanikolic’s picture

Status: Active » Needs review
FileSize
820 bytes

Changed the toolbar hook for adding the toolbar theme CSS via page attachments.

sasanikolic’s picture

Issue summary: View changes
juanse254’s picture

Looks good to me.

Berdir’s picture

Status: Needs review » Needs work
+++ b/tmgmt.module
@@ -1074,16 +1074,12 @@ function tmgmt_cart_source_overview_validate(array $form, FormStateInterface $fo
+function tmgmt_page_attachments(array &$attachments) {
+  // Load the CSS only if the user has the permission to access the toolbar.
+  if (\Drupal::currentUser()->hasPermission('access toolbar')) {

This explains the if but not what we are actually doing.

// Add CSS for the Translation icon in the toolbar if the user has access to it.

Something like that?

Also, thinking about it, we should check if the user has access to the toolbar *and* access to that menu link...

sasanikolic’s picture

Status: Needs work » Needs review
FileSize
887 bytes
752 bytes

Not sure about the second permission... Is this correct?

Berdir’s picture

Status: Needs review » Needs work

No :)

Same as ViewJobAccess, that's the one controls access to that page.

sasanikolic’s picture

Status: Needs work » Needs review
FileSize
1.02 KB
927 bytes

Now we're checking for any of the tmgmt permissions. If the user has at least one of them, we load the library/icon.

LKS90’s picture

Status: Needs review » Reviewed & tested by the community

The toolbar is fixed.

Berdir’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

  • Berdir committed 08293a1 on 8.x-1.x authored by sasanikolic
    Issue #2537592 by sasanikolic: Toolbar broken - empty toolbar item
    

Status: Fixed » Closed (fixed)

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