I have been trying to get search api attachments working in a clean install of Drupal 7.23.
I tried the stable release 1.3, but has the same error, so tried the dev release.
It is throwing the following error and not indexing the attachment. I see that tika must be running as the cache_search_api_attachment data field BLOB has the extracted text, but nothing is getting pushed to my solr server related to the attachment. It is showing the following entry in the log:
Notice: Undefined property: stdClass::$attachments_field_asset in SearchApiAttachmentsAlterSettings->alterItems() (line 39 of /www/sites/all/modules/search_api_attachments/includes/callback_attachments_settings.inc).
I poked around and I can't even find a reference to attachments_field_asset anywhere in any of search_api and related modules.
I would appreciate any assistance that can be provided.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 2126103-13-search_api_attachments_undefinde_index_SearchApiAttachmentsAlterSettings.patch | 2.19 KB | izus |
| #10 | 2126103-9.patch | 931 bytes | thepanz |
Comments
Comment #1
izus commentedMaybe in admin/config/search/search_api/index/MY_INDEX/fields, there is a attachments_field_asset that should be checked ?
Comment #2
izus commentedUpdating status and category
Comment #3
izus commentedalso changing title
Comment #4
cmkeane commentedYes, the attachments_field_asset is checked and listed as Fulltext.
Comment #5
cmkeane commentedInterestingly, I went to an existing server where I DO have search attachments working properly (v 1.3) and interfacing with the same solr server (different core). The only difference is the working server has php 5.3 while the non-working one has php 5.5. Other than that I am not finding any material differences in the configurations. Is PHP version potentially an issue?
Comment #6
izus commentedhmm, weird...i don't know if other people that use php5.5 have the same trouble (i'm using 3.5).
Did you success to find the line code to blame ? a php syntax that evaluates on 5.3 but not on 5.5 ?
Thanks for your investigations :)
Comment #7
cmkeane commentedThis had me totally stumped. I never could isolate it. I did a completely clean install on another instance (this one using PHP 5.4) to meet deadline and it worked properly. I have the old config and when I get a chance, I will poke around more at it and add more info here then.
Comment #8
thepanz commentedAfter some investigations, the reason of this issue looks like the one at https://drupal.org/node/2050775 : in PHP 5.5 something has changed in the way properties are handled.
My working code (edit line 39 of callback_attachments_settings.inc) is the following:
Comment #9
thepanz commentedComment #10
thepanz commentedComment #11
thepanz commentedComment #12
garrettc commentedI can confirm that this patch fixes the issue on PHP 5.5.7.
Comment #13
izus commentedHi
thanks for the patch.
I added it also for the submodule search_api_attachments_field_collections
i will merge it soon
Comment #14
izus commentedlast patch is merged to 7.x-1.x
Thanks all