When you add a "Content list" or "Content item" widget and it can't find any results to be displayed it shows "There is no content to be shown."

This message won't likely be shown when you first create the widget (except in the live preview) but can appear down the line if you add a "Content list" which has items, and then later, those items are removed. Or if you have "Content item" and it's underlying node is removed.

The problem is that "There is no content to be shown" just isn't a good end user message - that is for anonymous visitors of your site. It's super generic and lacks any necessary context in which the site builder is using it. And I'm not sure we can make any general purpose message that is better!

So, I'd like to propose simply removing the no results behavior from the View, which will cause empty "Content list" and "Content item" widgets to simply disappear. This gives the site builder a chance to figure out what to do next (ie. if a often reused content item is removed, they can go around the site and replace it) and doesn't show weird messages to visitors in the meantime.

In the one context where this message made sense, the live preview, users would then see "[no preview]" when their search doesn't find any results. This message could be made better, to maybe explain that their is no preview because their settings are incomplete or the widget needs some context it doesn't have (could be a new issue!). But, I don't think that "[no preview]" is any worse than the existing message. :-)

Comments

dsnopek’s picture

Status: Active » Needs review
StatusFileSize
new1.25 KB

Patch is attached!

cboyden’s picture

This behavior also happens when the content item you've inserted is unpublished. Anyone who can't see unpublished content will see the generic message; anyone who can will see the content with the unpublished highlighting.

cboyden’s picture

Status: Needs review » Reviewed & tested by the community

Tested, works as expected. The approach makes sense to me. It's the same thing that happens for other empty widgets like content list.

dsnopek’s picture

Status: Reviewed & tested by the community » Fixed

Committed!

  • dsnopek committed dc3d83e on 7.x-1.x
    Updated Panopoly Widgets for Issue #2421593 by dsnopek: Remove empty ("...

Status: Fixed » Closed (fixed)

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