Closed (fixed)
Project:
Search API Autocomplete
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 May 2012 at 19:33 UTC
Updated:
29 Oct 2012 at 09:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
mh86 commentedAn UI for this sounds like a nice idea. Where would you place such an option?
Comment #2
drunken monkeyPlease see and test the attached patch!
Comment #3
mh86 commentedSetting the fulltext field works fine, but the admin form is broken in certain cases.
I've activated the "Complete entity view" fulltext field, and disabled it afterwards. When viewing the autocomplete setting form, 2 checkboxes are listed, but the one for the disabled entity view fulltext field has no label (see screenshot)
Comment #4
drunken monkeyOnce again, I cannot reproduce your problem. It's also not apparent in the code how this could happen. I just use
$index->getFulltextFields()to retrieve the available options.Of course, that method has an internal static cache, but this should only affect the outcome if you'd disable the field in the same page request as showing the form, or when you have some improper entity caching in place. And even these problems should be fixed with #1414138-20: Notice: Undefined index: search_api_access_node.
So, I really have no idea what goes wrong there for you. Does clearing cache help? Do you have some entity caching in place?
Otherwise, please debug
$index->getFulltextFields()to see why it returns an unindexed field, and/or check if the stored index object is correct ($index->options['fields']doesn't containsearch_api_viewed).Comment #5
mh86 commentedNow I can't reproduce it either, so marking it as RTBC. If I see this problem again, and have more information, I'll open a separate issue.
Comment #6
drunken monkeyOK, committed.