I have an image style using Focal Point Scale and Crop and Watermark effects. I use the following code

$style_storage = \Drupal::entityTypeManager()->getStorage('image_style');
$styles = $style_storage->loadMultiple($style_list);
if ($style_config = $style->getEffects()->getConfiguration()) {
  $style_data = array_values($style_config)[0]['data'];
}
if (empty($style_data['width'])) {
....
}

It works ok, but when I add another focal point scale, move it to the top and delete the previous focal point scale, the $style_data['width'] is empty. Removing the watermark effect and adding it again solves it, the $style_data['width'] is populated again.

Not sure, but it seems like it is a bug.

Comments

balagan created an issue. See original summary.

Version: 8.3.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

pameeela’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +Bug Smash Initiative

Hi @balagan Focal Point Scale and Crop and Watermark effects are not included in core. Does this issue occur in core or should this be moved to the contrib queue?

pameeela’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)