Problem/Motivation

In issue #2009662: [REGRESSION] Replace theme() with drupal_render() in picture module a fix was committed in the comment #30 #2009662-30: [REGRESSION] Replace theme() with drupal_render() in picture module and was reopened to add the tests.

Remaining tasks

  • Test the alt tag Do we care that the alt tag shows up in the markup?
  • Fix the tests.
  • Fix the bug if there is one.

Proposed resolution

Not sure this resolution tex is relevant anymore as the code has changed. Old text:
We are opening this new issue for that specific task.
These people contributed on the creation of the original patches: Eric_A, jessebeach, pwieck, porchlight, jeanfei, InternetDevels, lokapujya
And should be mentioned when committing the fix for this issue.

Comments

rjarteta’s picture

Title: [REGRESSION] Replace theme() with drupal_render() in picture module » Create / Enhance the tests of responsive_image module.
Issue summary: View changes
Issue tags: +Needs reroll
StatusFileSize
new1.75 KB
new9.05 KB

Adding the original patches.

rjarteta’s picture

Adding the documentation and conditional modification from one of the original patches.

rjarteta’s picture

Status: Needs work » Needs review

Two more patches are coming.
But the current patch needs review.

The last submitted patch, 1: picture-formatter-tests-2009662-0.patch, failed testing.

The last submitted patch, 1: 2009662-wip.patch, failed testing.

lokapujya’s picture

Issue tags: +Needs tests

So far, this looks like the appropriate reroll. We'll still need to review the actual changes. We need to add the tests to the working patch so adding "Needs tests."

For example, I don't know if we need such a long comment and it's repeated in 3 places. We specifically don't need the comment starting on line 80.

rjarteta’s picture

I moved the code from patch from picture-formatter-tests-2009662-0.patch so applies now.
I know there is a problem when I run the test locally, but I'm uploading anyway as intermediate work. The creation of the field_config entity and its instance is not working.

This is only the test from the original patch.

Status: Needs review » Needs work

The last submitted patch, 7: responsive-image-theme-testing-2425493-6.patch, failed testing.

rjarteta’s picture

@lokapujya, I've been reading this test and it looks like all of the tests in responsive-image-theme-testing-2425493-6.patch are being covered on the ResponsiveImageFieldFormatters file.

Should we keep working on this re-roll?

lokapujya’s picture

Priority: Major » Normal

What we need is to apply both the bugfix patch in #2 and the tests in 2009662-wip_0.patch and combine them into one patch.

...and hopefully, the tests that are failing in the test-only patch will pass.

lokapujya’s picture

This is for more than just creating tests. It's fixing a regression/bug with the alt tag.

attiks’s picture

Quick review, ++ for all comments, I guess only adding tests for the empty alt will be sufficient, as said in #9 most other tests already exist.

+++ b/core/modules/responsive_image/responsive_image.module
@@ -76,6 +76,18 @@ function responsive_image_menu() {
+    // theme('picture') to pass explicit NULL for it to be omitted. Usually,
...
+    // theme('picture') to pass a meaningful value for the alt variable.

@@ -109,6 +121,18 @@ function responsive_image_theme() {
+ *     theme('picture') to pass a meaningful value for this variable.

theme('picture') no longer exists.

rjarteta’s picture

Status: Needs work » Needs review
StatusFileSize
new5.7 KB

Hi, I'm uploading the test with some changes from the original, since the conditional for the test was too specific, it failed when the image rendered with height and width.

I had to join both patches since the change on the conditional allowed the test to pass.

I'm updating the summary later.

@attiks I also updated the documentation as you pointed out.

rjarteta’s picture

Title: Create / Enhance the tests of responsive_image module. » Add 'tag' attribute tests for responsive_image module.
Issue summary: View changes
Issue tags: -Needs issue summary update

Removing the generic step on the summary and changing the title describing better the scope of this issue.

Status: Needs review » Needs work

The last submitted patch, 13: complete-diff-with-doc-and-test-change-2425493-13.patch, failed testing.

lokapujya’s picture

Title: Add 'tag' attribute tests for responsive_image module. » Allow picture to not have a 'tag' attribute and add tests for responsive_image module.
lokapujya’s picture

Status: Needs work » Needs review
StatusFileSize
new5.84 KB
new0 bytes

Fix some flaws in the test.

lokapujya’s picture

StatusFileSize
new2.33 KB

redo interdiff.

lokapujya’s picture

StatusFileSize
new2.37 KB

The picture element alt tag still has to be tested, and I think doesn't work right. Here is a Work In Progress.

mgifford’s picture

Status: Needs review » Needs work

Patch no longer applies.

lokapujya’s picture

Status: Needs work » Needs review
StatusFileSize
new2.31 KB

Providing a reroll. Not sure if making the the alt tag required/optional works (and whether or not any tests exist for it.) So, first someone should probably test that manually. This patch is only a clue of where to get started with the code.

lokapujya’s picture

Issue summary: View changes
Issue tags: -LatinAmerica2015
lokapujya’s picture

Issue summary: View changes
lokapujya’s picture

When there is no alt tag, I inspect the html and still see alt in chrome, alt="" in firefox. Should we even care? Doesn't seem to be a problem.

Status: Needs review » Needs work

The last submitted patch, 21: 2425493-21.patch, failed testing.

lokapujya’s picture

Actually, I don't remember how to get the picture tag :( So I guess I didn't actually test a picture tag, but a responsive image.

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

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.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.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should 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.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should 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.

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

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.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.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.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.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.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.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.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.

Version: 8.8.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. 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.

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

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

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

It has been over 9 years since there was work here. I read the issue and I am not sure what is to be tested here.

In any case, does anyone know if this is still relevant?

I am setting the status to Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

Thanks

acbramley’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

As per #40 I'm closing this. I have read through the IS and comments and agree that it's not clear what the issue is here. The patches all contain quite different changes too.

If this is still an issue, please feel free to reopen this with an updated issue summary describing the bug and steps to reproduce it.