It would appear that this occurs for custom Recent Activity blocks created based on the activity block-type. It does not occur with the pre-made activity block that the installer creates.
Apparently the default settings from a block-type are not copied over for any block-type when you create a new block based on another block. Additionally, manual settings on any block, custom or not, that has been edited from its default state cannot be read because json_decode is used against serialized data.
In order to fix all of these problems on existing blocks, an upgrade script is probably necessary. But you can also get a working block by creating a new one after making the following changes:
In
vault/core/controller/cp/block/base/vw.php, find:
Code:
$blockdm->set('data', serialize($data));
Replace with:
Code:
$blockdm->set('data', json_encode($data));
In
vault/core/model/rebuild/vw.php, find:
After it, add:
Find:
Code:
$prep['t']['fields']['varname'] => '',
After it, add:
Code:
$prep['t']['fields']['defaults'] => '',
In
vault/core/model/block/vw.php, find:
Code:
$data = $blockinfo['data'];
$data = json_decode($data, true);
Replace with:
Code:
$data = array();
if (!empty($blockinfo['defaults']))
{
$defaults = json_decode($blockinfo['defaults'], true);
if (!$defaults)
{
$defaults = @unserialize($blockinfo['defaults']);
}
if (is_array($defaults))
{
$data = array_merge($data, $defaults);
}
}
if (!empty($blockinfo['data']))
{
$customdata = json_decode($blockinfo['data'], true);
if (!$customdata)
{
$customdata = @unserialize($blockinfo['data']);
}
if (is_array($customdata))
{
$data = array_merge($data, $customdata);
}
}