Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, I'm really enjoying trying out omega 4.x so far; thanks for creating this! I did happen to notice some weirdness when trying to use the newly included panels layouts with display suite, and thought I would file a bug. I'm using display suite and the two column panels layout. There are two issues I'm seeing. The first is in the way the page renders. It shows the text "Array" in empty areas:
The second issue is that under "manage display" for the content type, it won't let me move fields to anywhere except the Top Left area:
Here is what I have selected for the layout:
Any ideas?
Comment | File | Size | Author |
---|---|---|---|
#8 | omega-panelslayoutfix-2093175-8.patch | 573 bytes | peteainsworth |
#7 | omega.code_.2093175-7.patch | 1.28 KB | fubhy |
#1 | omega-panelslayoutfix-2093175-1.patch | 1.74 KB | bkildow |
ds.png | 47.4 KB | bkildow | |
ds_fields.png | 57.04 KB | bkildow |
Comments
Comment #1
bkildow CreditAttribution: bkildow commentedI think I figured it out! The issue of not being able to move around the fields looks like it due to the way the plugin array is defined. Switching to underscores in the theme definition seems to fix this issue (i.e. top_left instead of top-left). In regard to the other issue of showing arrays, it looks like display suite adds some extra elements to the $content array. I fixed the issue by explicitly printing the regions instead of looping over $content variable.
Comment #2
peteainsworth CreditAttribution: peteainsworth commentedI've tested your patch and both the changes to grid-2.inc and grid-2.tpl.php work well with display suite and panels.
Comment #3
msmithcti CreditAttribution: msmithcti commentedThat makes sense that display sweet could choke on the hyphens instead of underscores. Not tested this yet but just a quick review:
Why is this loop being removed in favour of hardcoding each item?
Comment #4
bkildow CreditAttribution: bkildow commentedDisplay suite looks like it adds extra render array elements to the $content variable depending on what fields are added. By hardcoding the regions, it avoids printing any extra stuff that's not needed. If you want to keep the loop, checking for and excluding arrays might work as well:
Comment #5
fubhy CreditAttribution: fubhy commented"Display Sweet" - I lol'ed :P
Anyways.. I am also in favor of the loop, especially because it has this check:
Comment #6
fubhy CreditAttribution: fubhy commentedIn that case, we should explicitly loop over
array_intersect_key()
with the regions defined in the layout.Comment #7
fubhy CreditAttribution: fubhy commentedI committed it like this!
Thanks @bkildow!
Comment #8
peteainsworth CreditAttribution: peteainsworth commentedIn my testing this fix generated an 'Undefined variable: layout' error on a display suite page.
is_array() works on panels and display suite pages provided the || in #2093175-4: Display Suite and Panels Layout Weirdness is swapped for &&
Comment #9
steinmb CreditAttribution: steinmb as a volunteer commented@peteainsworth not sure I you suggest #7 reverted and #8 committed as a better fix?