Confirmed Rebuilding one style loads properties from unrelated styles

Painbaker

Well-known member
Licensed customer
Affected version
2.3.13
StyleProperty\RebuildService::rebuildPropertyStyleCacheForStyle() fetches all style properties before determining which styles it needs to rebuild


PHP:
\XF::runOnce('stylePropertyCacheRebuild' . $this->style_id, function ()
{
    $this->getPropertyRebuildService()->rebuildPropertyStyleCacheForStyle($this->style_id);
});
The rebuild receives $styleId but fetches and groups every property from every style before validating the target. The query has no style_id filter.

PHP:
$properties = $this->finder(StylePropertyFinder::class)
    ->order(['style_id', 'property_name'])
    ->fetch();

$byStyle = [];
foreach ($properties AS $property)
{
    $byStyle[$property->style_id][$property->property_name] = $property;
}
 
Back
Top Bottom