Problem/Motivation

Responsive image style is deleted when a mapped (or fallback) image style gets deleted. This is because of unresolved dependency.

Proposed resolution

Implement onDependencyRemoval() and: DECIDE WHAT TO DO!

Note that on image style deletion the user is able to provide a replacement that can be used to replace the deleted style in responsive image style.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

Assigned: Unassigned » attiks

@attiks, also this needs a decision. I can provide the patch but we need to answer first to "Proposed resolution"

claudiu.cristea’s picture

FileSize
1.73 KB

Hm.... The test didn't run. I cannot explain. Let's try with a new patch.

claudiu.cristea’s picture

alexpott’s picture

According to the logs the patch is applied.

10:05:49 Patch /var/lib/drupalci/web/jenkins-default-72188/modules/drupal/responsive_1.patch applied to directory /var/lib/drupalci/web/jenkins-default-72188/modules/drupal

claudiu.cristea’s picture

@alexpott, check the test log, see that ResponsiveImageIntegrationTest never runs. What else?

attiks’s picture

@claudiu.cristea Isn't there a way to block the deletion of an image style if it is in use?

alexpott’s picture

Hmmm I applied the patch locally and ran runtests.sh with --list | grep ResponsiveImageIntegration and that returned...

 - Drupal\Tests\responsive_image\Kernel\ResponsiveImageIntegrationTest

And the test was runnable - and it failed... very very odd.

claudiu.cristea’s picture

@attiks, there is a confirmation step on UI. But only on UI. If you delete through API then will remove the responsive image containing it. We can imagine at least 2 options:

  1. Just delete from mapping.
  2. Replace with the replacement, if any.
claudiu.cristea’s picture

@alexpott, Yes, I did that too. I reapplied the patch against HEAD and run the test. Everything looks OK locally.

claudiu.cristea’s picture

For the bot issue I opened #2657482: Test bot doesn't apply the patch. Let's move there the bot discussion.

The last submitted patch, bug-evidence.patch, failed testing.

The last submitted patch, bug-evidence.patch, failed testing.

The last submitted patch, 3: 2657212-3-test-only.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 4: responsive.patch, failed testing.

Wim Leers’s picture

Version: 8.0.x-dev » 8.2.x-dev

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

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

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

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.