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!
There is a problem if we use Panels, Search-Api, Search-Views-Integration, FacetedSearch together with AT.
Notice: Undefined offset: 0 in adaptivetheme_item_list() (Zeile 220 von /.../htdocs/sites/all/themes/adaptivetheme/at_core/inc/theme.inc).
We use the newest version of the modules and Drupal Core.
Wr
Paulap
Comments
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedWooo, slow down there partner, if you can show me the bug I'm all ears, I would tend to think one of those modules is implementing theme_item_list and incorrectly adding a class, possible with a variable that is empty - that is a more likely scenario.
try var_dump($attributes); on line 216 of theme.inc in AT Core and paste the output.
I mean I could run more conditions here but attributes is always meant to be an array and items should be set and not empty etc.
Comment #2
romansta CreditAttribution: romansta commentedGot the same notice with Search-Api, Search-Views-Integration, FacetedSearch, but without Panels. Since there were only three ...
Comment #3
Jeff Burnz CreditAttribution: Jeff Burnz commentedAnd the debug output as per instructions in #1 ?
Comment #4
zeezhao CreditAttribution: zeezhao commentedGot similar error message using search_api, search_api_page, facetapi. I am using the adaptivetheme-7.x-3.x-dev with corolla-7.x-3.x-dev.
Debug output as per #1 is
Thanks
Comment #5
Jeff Burnz CreditAttribution: Jeff Burnz commentedOK, on line 222 in theme.inc in AT Core, where the code is:
if (isset($attributes['class'])) {
change to
if (isset($attributes['class'][0])) {
See if that clears up the problem.
FacitAPI seems to set some classes here (roughly from what I can tell in http://cgit.drupalcode.org/facetapi/tree/plugins/facetapi/widget_links.inc) and I am not entirely sure why it's doing this the way it is (I mean it could have some purpose like JS hooks etc), but for some reason we have two class arrays and one is empty, which is causing the notice.
Comment #6
zeezhao CreditAttribution: zeezhao commentedThanks for your suggestion. It seems to clear it up for me. It's actually line 219 in latest dev version
("7.x-3.2+2-dev" of 2014-04-29).
Comment #7
Jeff Burnz CreditAttribution: Jeff Burnz commentedTheres a patch in the other issue, lets switch to that one: #2279597
Comment #8
redhatusr CreditAttribution: redhatusr commentedsame notice with Search-Api without Panels, solution #5 did not solve the problem