- Issue created by @datawench
As far as I can tell, assigning a focal point to an image doesn't save the height and width attributes of that image.
This came up while I was mangling the Single Content Sync β plugin, and observing that these attributes weren't appearing the export data, and thus when imported the focal points would get lost because the calculations for X and Y always used 0 as height and width values.
And when I examine the crop_field_data
table, I observe that in fact those values are not populated.
It looks to me like the
Crop β
plugin does save the values, and when I take a look at this plugin I see this in FocalPointManager.php
:
public function saveCropEntity(float $x, float $y, int $width, int $height, CropInterface $crop): CropInterface {
$absolute = $this->relativeToAbsolute($x, $y, $width, $height);
$anchor = $crop->anchor();
if ($anchor['x'] != $absolute['x'] || $anchor['y'] != $absolute['y']) {
$crop->setPosition($absolute['x'], $absolute['y']);
$crop->save();
}
return $crop;
}
No height and width save there?
For now I've solved my immediate issue (I hope) by hacking single_content_sync
, but this might need some examination here, unless I'm quite mistaken.
Active
2.1
Media Integration