Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Database search
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2011 at 15:01 UTC
Updated:
18 Aug 2011 at 12:32 UTC
Jump to comment: Most recent file
Comments
Comment #1
damien tournoud commentedThis fixes it, and probably a couple of related bugs.
I see no obvious way of extending the automated tests to cover this, so I'll let it as an exercise for the reader.
Comment #2
drunken monkeyUnless I'm mistaken,
$new_inner_typewon't be set here, as you set that inside of the aboveifblock. You could just useseach_api_is_text_type($new_type)instead – or extract the types outside of the blocks,of course.Otherwise, the patch looks good, thanks a lot for spotting this!
Comment #3
damien tournoud commentedGood catch. Here is a fixed version.
Comment #4
drunken monkeyPatch looks good, but I think there are still cases where this wouldn't work – mostly, when the list level of a field type changes (which might happen e.g. with data alterations, or when switching a field from single-valued to multi-valued). Please see if the attached patch works for you, too.
Comment #5
damien tournoud commentedOk, but this encovered another issue:
_search_api_admin_get_fields()never updates the nesting level of a known field...Comment #6
drunken monkeyWow, awesome that you spotted and fixed that!
Patch looks good now and also seems to work – committed, thanks again!