Posted by B-Prod on April 17, 2010 at 6:08pm
6 followers
| Project: | Drupal core |
| Version: | 6.x-dev |
| Component: | theme system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
| Issue tags: | needs backport to D6, needs backport to D7, Needs issue summary update, Needs tests |
Issue Summary
When you want to print multi-level lists with item_list theme, there is a configuration where the $data variable is not reset. This create duplicates in the rendered list.
Example:
$items = array(
array(
'children' => array('item 1', 'item 2'),
),
array(
'children' => array('item 3', 'item 4'),
),
);
theme('item_list', $items);The result is:
-
- item 1
- item 2
-
- item 1
- item 2
- item 3
- item 4
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| drupal_theme_item_list.patch | 544 bytes | Idle | FAILED: [[SimpleTest]]: [MySQL] Invalid patch format in drupal_theme_item_list.patch. | View details | Re-test |
Comments
#1
The last submitted patch, drupal_theme_item_list.patch, failed testing.
#2
#3
#4
The last submitted patch, drupal_theme_item_list.patch, failed testing.
#5
#6
Sorry, it was not the right patch...
#7
The last submitted patch, drupal_theme_item_list.patch, failed testing.
#8
Try again :)
#9
#10
The last submitted patch, drupal_theme_item_list.patch, failed testing.
#11
D7 still has this bug.
#12
Remove the tag put in by mistake
#13
Needs to be fixed in D8 first before D7 and D6 patches will even be considered.
This simple one line initializing the $data value looks good to me, but I do not have a testing environment to test the patch.
#14
Updating the issue tags so flagged for backporting to D7 and D6.
#15
This fixes the bug described in the OP, as well as a PHP notice when $data isn't present.
#16
Tagging issues not yet using summary template.
#17
Sorry, but we need tests here.
Though this patch also somewhat duplicates the work in #256827: Various bugs in theme_item_list()
#18
This was apparently committed already in D7 and obsolete in D8.
http://drupalcode.org/project/drupal.git/commit/781b8961