The template committed in #1939062: Convert theme_item_list() to Twig was missing logic to only display the empty text when no results were found. This made #1926344: Consolidate search-result.html.twig and search-results.html.twig break HEAD.

This follow-up issue is to fix the bug in the template and add more test coverage for the relatively new functionality added by #2120807: Add empty option to item_list.

CommentFileSizeAuthor
#1 2191323-1.patch1.63 KBstar-szr
#1 2191323-1-testonly.patch1.15 KBstar-szr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

star-szr’s picture

Assigned: star-szr » Unassigned
Status: Active » Needs review
FileSize
1.15 KB
1.63 KB

Here we go.

webchick’s picture

Heh. I actually saw that last night, but thought it was some Twig-ism I wasn't familiar with. Oops. :P

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks pretty straightforward to me. Assuming the testbot agrees that TestOnly fails and Patch passes, this should be good to go.

joelpittet’s picture

RTBC++

The last submitted patch, 1: 2191323-1-testonly.patch, failed testing.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

jibran’s picture

+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
@@ -60,6 +60,14 @@ function testItemList() {
+    $variables['items'] = array('Un', 'Deux', 'Trois');
+    $expected = '<div class="item-list"><h3>Some title</h3><ul><li>Un</li><li>Deux</li><li>Trois</li></ul></div>';

Now I can count in french because of #Drupal core. Thank you @Cottser.
https://twitter.com/JibranIjaz/status/431895551928315904

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.