I've discovered that new blocks you add will not appear unless you select a subsite (or all subsites). I can see why you might do this but I had presumed that if you untick all the subsites and main site you're implying you don't care where the block appears and what it to appear everywhere.

I have quite a lot of blocks so to have to go through them and re-tick the subsite on all blocks every time I add a new subsite would be pretty frustrating.

Could we make this work such it only filters the blocks if at least something has been ticked (i.e. the array of subsites is not all zero's) rather than if the array or subsites is not empty.

Happy to write a patch if you agree this is a sensible approach.

Thanks
Chris

Comments

chunty’s picture

Searching a solution to this problem over a year later I came across my own issue report.....so I built a work around based on this.

In subsites.blockvis.inc simply replace:

<?php
// Only need to take action if a list of subsite restrictions has been selected for this block.
if (!empty($show_subsites)) {
?>

with this:

<?php
// Only need to take action if a list of subsite restrictions has been selected for this block.
$tmp = array_filter($show_subsites);
if (!empty($tmp)) {
?>

That seems to sort it for me and comply still with the intended behaviour

chunty’s picture

Status: Active » Needs review