Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
responsive_image.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Feb 2015 at 20:46 UTC
Updated:
4 Mar 2015 at 15:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
yched commentedPatch fixes changes ResponsiveImageFormatter to do the same as ImageFormatter.
I guess that logic could be moved up to a separate helper method in ImageFormatterBase, not fully sure that's really worth it...
Also, this will need tests...
Comment #2
wim leersFor test inspiration: see
\Drupal\image\Tests\ImageFieldDisplayTest::_testImageFieldFormatters(), specifically this bit:Should be added to
\Drupal\responsive_image\Tests\ResponsiveImageFieldDisplayTest().Comment #3
jedihe commentedComment #4
jedihe commentedWith help from nelllaparedes and joosuuee, we did manual testing of the patch from #1. Results are good, Drupal breaks when trying to preview a node with an image field using a responsive image formatter (linked to 'content' in "manage display" options for the content type); the patch fixes the issue as expected .
Testing steps:
After applying the patch, the same steps as above didn't give us an error. The node preview displayed just normally.
These screenshots show the two states (broken/fixed):
Broken:
Fixed:
Comment #5
jedihe commentedComment #6
jedihe commentedComment #7
yched commented@jedihe: thanks for the screenshots and detailed steps to reproduce !
However, "Needs tests" more specifically means adding testing code in our test suite so that the behavior is automatically tested against potential regressions later.
Thus, the correct issue status is "needs work" atm, until those tests are added to the patch. Will try to work on that, but can't honestly say it's on the top of my list, so anyone is more than welcome to pick it up.
(and thanks a lot @Wim for the pointers in #2, finding the right place for new tests to fit given the size of our test suite can be a bit daunting...)
Comment #8
yched commentedAlso, @jedihe++ for the inception-style screenshots :-p
Comment #9
jedihe commented:D Apologies for not using the right status.
After our testing, we worked with @dalguete to get a test (following Wim's excellent suggestion). Our guesswork got us a few steps forward, but not to a working version.
Comment #10
jedihe commentedFinally managed to get the test working as needed: it fails without the fix in place, and the fix makes it pass. Let's see what our helpful bot has to say.
The test was written jointly with @dalguete.
Comment #11
jedihe commentedJust learned on IRC that I must switch to Needs Review for the bot to see the patches. I'm reattaching the files, too.
Files are exactly the same as in #10, interdiff is against patch in #1.
Comment #13
jedihe commentedWell, we have a working prototype for the test. Now we need a reviewer to provide suggestions on how to refactor/polish it in order to achieve the required quality for committing.
Comment #14
wim leersGreat work, thanks!
Comment #15
yched commentedYay, thanks @jedihe & @dalguete !
Comment #16
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed a0d5bc0 and pushed to 8.0.x. Thanks!
Comment #19
yesct commentedadding back the sprint tag.
Comment #20
dalguete commentedYay!!!... heh. I love to see this committed. Cool to work with you @jedihe and for the directions at DrupalCon @YesCT.