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.
If a file exists in the index but the entity it is attached to does not return when loaded (e.g. deleted), the search result shows no results, and watchdog shows an error "Missing bundle property on entity of type node."
This is caused when generating an entity_uri for the parent, but the entity passed in is null.
Comments
Comment #2
Dave the Brave CreditAttribution: Dave the Brave commentedComment #3
Dave the Brave CreditAttribution: Dave the Brave commentedComment #4
Poindexterous CreditAttribution: Poindexterous commentedI've just run into this issue after some recent security updates to drupal modules (notably entity api 7.x-1. and file_entity 7.x-2.0-beta3). We had to re-index a test site of ours shortly after the module updates, and we had gotten the same error as mentioned in this issue thread, we've never seen it prior to these recent updates and normally were able to re-index without any trouble. I tried this patch but it didn't seem to resolve it in our case. Has anyone else had this particular error pop up since the recent security updates? Since this error is preventing solr from indexing our nodes correctly, we're wondering if anyone has a workaround. We're currently on the debating on whether we go ahead with the security updates or disable the solr file attachments module.
Thanks!
Comment #5
Poindexterous CreditAttribution: Poindexterous commentedI also stumbled across this issue thread and tried the patch there as well:
https://www.drupal.org/node/2195641
https://www.drupal.org/files/issues/apachesolr_attachments-missing_bundl...
Would these two issues be related in some way? They seem smilar.
While that patch did get rid of the "missing bundle property" error, it doesn't seem to resolve the issue with nodes not indexing properly (searches return zero results after re-indexing).
Comment #6
mausolos CreditAttribution: mausolos commentedHey guys, I think this is a dupe of this other one:
Remote parent entities cause EntityMalformedException in multisite search
I posted a patch that fixes this for the context of multisite. Are either (or both of you) running multisite perhaps? If so, try that patch, it should work nicely.
If not, let me know that as well. I'll update the patch to take into consideration files from other remote sources. What would be useful if that's the case is if you could give me a readout of what dpm($vars) in that function gives you.
Comment #7
ñull CreditAttribution: ñull as a volunteer commentedI have the same error but when I read through this patch in #2 I think there is an error. I think $snippet_suffix should at least return a closing
</span>
, not an empty string.Imho this would be better:
Or combine the two for better readability:
When I get around to it I will check the improved patch and post it.
Comment #8
ñull CreditAttribution: ñull as a volunteer commented