The 'empty' state of (core) blocks is ehm, quite empty, showing only a "(empty)" piece of text.

I found this in dashboard.module:
$block->content = array('#markup' => '<div class="dashboard-block-empty">(empty)</div>');

Can we add some per-block specificity here, like "No comments/forum topics/blog posts available"?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yoroy’s picture

Dashboard | d7

The totally empty one for 'Active forum topics' is probably a bug worthy of its own issue?

As you can see, the 'recent content' block does have its own specific 'empty' message.

yoroy’s picture

Issue tags: +Usability

tag

dmitrig01’s picture

Assigned: Unassigned » dmitrig01

Wow this is bad. no translation either

yoroy’s picture

Jody Lynn’s picture

Recent comments now shows an empty message.

The ones that show (empty) are blocks that outside of the dashboard would not appear at all (nothing is returned by hook_block_view when they are empty), whereas others return empty $block['contents'] and end up with blank content here.

I think nothing at all is better than (empty).

dmitrig01’s picture

Assigned: dmitrig01 » Unassigned
David_Rothstein’s picture

Status: Active » Needs review
FileSize
976 bytes

I'm not sure there is much we can do about this issue in the dashboard module itself. The dashboard does need to have some handling for blocks that are truly empty (i.e., would not otherwise display at all). To make individual blocks display but with "No X available" there needs to be issues filed against the modules that provide those blocks, I think.

The forum module block is a weird special case and does seem like its own bug. I filed an issue with a patch to fix that here: #1045390: Forum module blocks display with no content when they are empty

Attached is a patch that fixes the fact that "(empty)" wasn't translated, though. It actually was translated in one place in the code, but not in this one for some reason.... so this doesn't add any new strings. We can at least get that out of the way quickly.

Status: Needs review » Needs work

The last submitted patch, dashboard-empty-787924-7.patch, failed testing.

Jody Lynn’s picture

Status: Needs work » Needs review

Retest.

yoroy’s picture

Version: 7.x-dev » 8.x-dev
thedavidmeister’s picture

Issue tags: -Usability

#7: dashboard-empty-787924-7.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Usability

The last submitted patch, dashboard-empty-787924-7.patch, failed testing.

star-szr’s picture

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

Dashboard module is no longer in core, see #950956: Remove Dashboard from core . Moving to 7.x for consideration.