I’ve run into a problem where I cannot get any search results when I try to search for content that’s in a WYSIWYG custom field. More info can be found here:
http://ellislab.com/forums/viewthread/100517/
Basically, when I go to EDIT and try to search for a keyword no results will be displayed if that keyword is in a WYSIWYG custom field. If it’s in a textarea or text input then the search yields the correct results.
Anybody come across this problem?!
Thanks, Manoj
I’m not spotting anything in the core code that suggests it’s limiting based on field type. The first place I’d look though- check that the field is still marked as ‘searchable’- both in ‘Admin- Weblog Admin- Custom Weblog Fields’ for the relevant field. Then double check in the exp_weblog_fields table- do the wysiwyg fields show a ‘y’ in the field_search field?
It throws an error for me when I try to install, so I can’t test directly. I did manually flip a field to wysiwyg and I manually flipped a field formatting option to wysiwyg for one of my entries. In both cases, it still searches those fields as expected and I couldn’t spot anything in the EE code that would suggest otherwise.
I don’t think there’s a bug in core EE- just can’t spot it. I suspect there’s either an interaction between this extension and another one, or this extension is affecting some other setting that’s causing EE not to include it in the search.
Leevi is very responsive to issues, you might try contacting him directly and making sure he spots this thread. Otherwise- could try editing system/modules/search/mod.search.php around line 930:
/** ----------------------------------------------
/** Are there results?
/** ----------------------------------------------*/
$query = $DB->query($sql);
//hack
exit($sql);
All that will do is print out the main query used to determine whether there are results. Can use that to track backwards and see why it fails. I tend to suspect something in the database- ‘searchable’ was the most likely bet. But doesn’t look like that’s the case.
If you post back the query you get- and id the wysiwyg fields- I can help you pick it apart. But the author’s the best source for a fix on this one right now.
Robin, I understand that you’re not seeing anything in the core. However, I just downgraded the site we’re having this problem on to 1.6.4 – replacing /system/cp/, /system/db/, /system/core/, and /system/modules/ (just the EE modules; i left ALL the extra installed modules in), and making no other changes – and suddenly search works again on those fields.
I’m wondering if the issue is related to this thread in which case the fix would need to come from Leevi.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.