Personally, if there are no upcoming events I'd rather that the block not appear. At the very least it would be helpful to have a bit of text explaining that no events were found.

The attached patch hides the upcoming event block if no events are found.

Comments

killes@www.drop.org’s picture

While the feature makes sense to me, I'd like to hear the opinion of some usability experts. Should we simply hide the block or should we display a "not found" message?

drumm’s picture

I think having a message is a good idea.

joel_guesclin’s picture

I think it should be made a configurable option, so you can choose whichever you want

igrcic’s picture

'There are no new events soon' or similar message would do just fine i think :)

crunchywelch’s picture

Status: Needs review » Closed (fixed)

added message 'no upcoming events available' in cvs

drewish’s picture

Status: Closed (fixed) » Needs work
StatusFileSize
new2.28 KB

I've got a patch to make it a setting for the block.

killes@www.drop.org’s picture

Please, not yet another setting. The output of that node is themable, so you can change it to mysteriously disappear in your theme.

In fact, this block has a problem: On a cached page it will not change. If your site is only used for posting events once every quarter your page will be cached and the block will display wrong dates. We could add a cron hook that clears all of the cache once in a while...

drewish’s picture

The real problem is with caching in general. Caching the same page for longer than an hour isn't a good idea. I've got a block I developed for the radio station I work at that displays the current program. I had to disable caching or it would never update. I'll see if there's an open issue related to this.

drewish’s picture

StatusFileSize
new575 bytes

here's a backport of crunchywelch's change for 4.6. not sure if you want to apply it.

killes@www.drop.org’s picture

Status: Needs work » Fixed

we display a "not found" message

joel_guesclin’s picture

Actually, I sorted the whole problem by using Views instead of the standard Events block.

Anonymous’s picture

Status: Fixed » Closed (fixed)