We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

LG TinyMCE WYSIWYG custom fields won't return search results

Development and Programming

Manoj Thomas's avatar
Manoj Thomas
185 posts
16 years ago
Manoj Thomas's avatar Manoj Thomas

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

       
Robert Aitken's avatar
Robert Aitken
13 posts
16 years ago
Robert Aitken's avatar Robert Aitken

Ack. I’m having this problem too.

       
Robert Aitken's avatar
Robert Aitken
13 posts
16 years ago
Robert Aitken's avatar Robert Aitken

The problem seems to be the excerpt plugin. I removed the {exp:zm_excerpt} tags and the search TinyMCE fields are showing up. I really want to use both but I haven’t found a solution yet - will likely have to a different excerpt plugin. Hope that helps!

       
Manoj Thomas's avatar
Manoj Thomas
185 posts
16 years ago
Manoj Thomas's avatar Manoj Thomas

Hey Robert, glad that worked for you, but no luck for me (I’m not using that plugin and I also tried a basic test with minimal content with the same results).

       
LHDonline's avatar
LHDonline
18 posts
16 years ago
LHDonline's avatar LHDonline

Add me to the list with this issue (and not using excerpt plugin either)–and in somewhat urgent need of a fix. Leevi, you out there?

       
Manoj Thomas's avatar
Manoj Thomas
185 posts
16 years ago
Manoj Thomas's avatar Manoj Thomas

Yeah I still haven’t been able to get rid of this problem. All my 1.6.6 clients are unable to search anything since almost all field types are WYSIWYG.

       
Adrienne L. Travis's avatar
Adrienne L. Travis
213 posts
16 years ago
Adrienne L. Travis's avatar Adrienne L. Travis

+1 on this – got a client we just upgraded to 1.6.6, and all WYSIWYG fields are suddenly unsearchable with nothing else having changed!

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
16 years ago
Robin Sowell's avatar Robin Sowell

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?

       
Adrienne L. Travis's avatar
Adrienne L. Travis
213 posts
16 years ago
Adrienne L. Travis's avatar Adrienne L. Travis

In at least our case, yes to both.

       
Manoj Thomas's avatar
Manoj Thomas
185 posts
16 years ago
Manoj Thomas's avatar Manoj Thomas

Yes to both for me, too.

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
16 years ago
Robin Sowell's avatar Robin Sowell

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.

       
Manoj Thomas's avatar
Manoj Thomas
185 posts
16 years ago
Manoj Thomas's avatar Manoj Thomas

Thanks, Robin. I shot Leevi an email.

       
Adrienne L. Travis's avatar
Adrienne L. Travis
213 posts
16 years ago
Adrienne L. Travis's avatar Adrienne L. Travis

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.

       
Manoj Thomas's avatar
Manoj Thomas
185 posts
16 years ago
Manoj Thomas's avatar Manoj Thomas

FYI, here’s what Leevi said:

Hey Manoj, I have a feeling the issue is related to not setting the field formatting when a new entry is saved. I’ll try and take a look at this issue during the week if I get a break from client work. Kind Regards, Leevi Graham
       
Lisa Wess's avatar
Lisa Wess
20,502 posts
16 years ago
Lisa Wess's avatar Lisa Wess

I’m wondering if the issue is related to this thread in which case the fix would need to come from Leevi.

       
1 2 3

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.