Search throws a notice & warning message when searching for content:
Notice: Undefined property: stdClass::$zm_parent_entity in theme_apachesolr_search_snippets__file() (line 545 of /mnt/www/html/generalitest/docroot/sites/all/modules/contrib/apachesolr_attachments/apachesolr_attachments.module).
Warning: Invalid argument supplied for foreach() in theme_apachesolr_search_snippets__file() (line 545 of /mnt/www/html/generalitest/docroot/sites/all/modules/contrib/apachesolr_attachments/apachesolr_attachments.module).
As can be seen on this test website:
http://test.geb.com/search/site/healthcare
The message appears 3 times which corresponds with the number of results inside indexed files.
The website use the dev version of apachesolr_attachments + apache solr 7.x-1.0-beta16 + acquia search
Comments
Comment #1
nick_vhHave you reindexed? Latest commit changed this field
Comment #2
batigolixyes i deleted the search index (but from the apache solr config page) & uninstalled all search related modules
after re-enabling and re-indexing the problem still exists
Comment #3
batigolixerror still occurring after deleting index via the solr attachment config page admin/config/search/apachesolr/attachments
Comment #4
nick_vhCan you verify if zm_parent_entity exists in your solr fields? (visible in http://apachesolrissues.dev/admin/reports/apachesolr)
Also, valuable info can be found when debugging the theme_apachesolr_search_snippets__file function. An export of the $doc variable would be useful. Also please upgrade to beta19 for apachesolr
Comment #5
nick_vhComment #6
batigolix1. nope, zm_parent_entity doesnt exist / is not visible in /admin/reports/apachesolr
2. export of the $doc variable:
3. will try upgrading to beta19 now
Comment #7
batigolixthe upgrade to beta19 did not automagically solve the issue.
what do you recommend? re-installing all modules search related modules again?
Comment #8
nick_vhAfter upgrading, did you re-index? I would recommend that you debug apachesolr_attachments_solr_document() and figure out what is being sent as zm_parent_entity
Comment #9
tauno commented(removed my previous comment since I think it was unrelated)
Don't forget to update your solr schema.xml using the latest version from the main apachesolr module. I was using a version that didn't define the zm_* field type.
Comment #10
nick_vhComment #12
gmreed commentedHi, I hope it is okay to reopen this issue as I have encountered the same message for attachments:
My setup is:
Apache Solr search attachments 7.x-1.0+16-dev
Apache Solr search 7.x-1.0-beta19
It seems that my problem has to do with schema.xml as per #9 above: I have confirmed that the schema.xml on my web server is drupal-3.0-beta16 version 1.2, which does define the zm_* field type (per #9 above). However, I am totally confused because when I open up the schema.xml from .../admin/reports/apachesolr/conf it is only drupal-3.0-beta4 and does not define the zm_* field type. It also lists the modified date as June 2nd even though I removed and reinstalled the modules today. After reinstalling the modules I then went to update.php but it listed no pending updates. So have I missed a step? Do I need to do something further to update the schema.xml and get the zm_* fields defined for the search indexing?
Also, I deleted the search indexes before uninstalling and reinstalling the modules but before doing so I checked .../admin/reports/apachesolr per #4 above and confirmed that zm_parent_entity did not exist.
Any help would be totally appreciated.
Comment #13
gmreed commentedAfter a bit more research it looks like I omitted a critical part of my setup: the site is using Acquia Search. So it looks like the schema.xml file is controlled by them and I have therefore posted an issue at Acquia Connector: http://drupal.org/node/1630514
If I am still off base, any advice or input would be great. Otherwise apologizes for cluttering up the issue queue over here.
Comment #14
nick_vhYou can select the schema in the settings pane in the network, look at the docs and choose schema-16
Comment #15
nick_vhComment #16
laken commentedN.B. On Acquia Search the schemas have been updated - schema-16 is no longer available. Currently you must select one of the 'apachesolr 7.x-1.0-rc2' schemas like so: https://skitch.com/alaken/epr2r/andy.laken-acquia
Hope that helps anyone with the same issue,