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 was getting the notice and warning as per subject in line 573:
foreach ($data['content']['bundle']["#items"] as $key => $item) {
so in order to fix that I wrapped the foreach into an if like the following:
if (isset($data['content']['bundle']) && is_array($data['content']['bundle']["#items"])) {
Maybe somebody can review this change and produce a patch?
Unfortunately I did a quick fix to avoid flooding the logs and currently having no time to produce a patch and post it here.
Regards,
Francesco
Comment | File | Size | Author |
---|---|---|---|
#8 | custom_search-2420757-facet-api.patch | 1.29 KB | jdanthinne |
Comments
Comment #1
kevster CreditAttribution: kevster commentedThx Francesco - I hit that today after updating the module - I can confirm that worked for me and cleared the exact same error...
Comment #2
jdanthinne CreditAttribution: jdanthinne commentedAre you both using FacetAPI? It seems that the error is coming from the integration between those two modules (and I didn't code it myself).
Comment #3
FrancescoUK CreditAttribution: FrancescoUK commentedYes, I use FacetAPI.
Comment #4
markbannister CreditAttribution: markbannister commentedalso use facetapi, occurred after update.
Comment #5
walterswa CreditAttribution: walterswa commentedalso using facet and also occured after upgrade. Issue fixed by replacing the line with the suggestion above.
Comment #6
jdanthinne CreditAttribution: jdanthinne commentedDoes the suggestion maintain the content exclusion function?
Comment #7
ntigh52 CreditAttribution: ntigh52 commentedHi all,
I also using facetapi.
I declare block custom search block and place it at the header of all my pages.
Each page view I get a lot of massages in the watchdog:
and also
Comment #8
jdanthinne CreditAttribution: jdanthinne commentedCan you try the attached patch?
Comment #9
ntigh52 CreditAttribution: ntigh52 commentedHi @jdanthinne,
I applied your patch and from thousands PHP Notices and Warnings I get just
when I get search results.
So I think that this patch solve that issue.
Thanks a lot.
Comment #10
jdanthinne CreditAttribution: jdanthinne commentedPushed to dev.