I have several CCK fields that are causing a notice which suggests I modify my view.
The errors look like this.

"CCK Type X is used in a view filter in the content_field_program table, but database row is of type longtext. This is generally a bad idea. Please change your view(s) to not filter on text."

This advice is unclear to me. What exactly should I do in this situation? Modify my view to not use the CCK field? or is it asking for something else?

Comments

mikeytown2’s picture

What to do in this situation depends on what your currently doing with that view and cck field. What is the cck field used for, and is this view slow for you? Did it correctly identify that this is a problematic query?

cruelgamer’s picture

I have around 6 of these fields each with that notice attached to them when i use db tuner. The cck fields are snippets of text that i use to build various url's and paths which are not drupal nodes. It's hard to say if the view is slow or not, but if it can be optimized i would certainly like to know how.

mikeytown2’s picture

whats the longest string you will ever have stored in this cck type?

mikeytown2’s picture

Go to your cck field's edit screen
Global settings
Maximum length
Set this to less then 255.

If less then 255 then mysql can index that field.

cruelgamer’s picture

Status: Active » Closed (fixed)

I am fairly confident none of the fields contain data over 255 characters. I made the changes to the CCK fields maximum length in global settings and the notices are gone now. Probably too early to tell if the view is any faster, but every little bit helps. Thanks for the quick responses, and thanks for the great module!

mikeytown2’s picture

Title: Please change your view(s) to not filter on text. » Provide simple guidance when this error occurs "Please change your view(s) to not filter on text."
Category: support » task
Status: Closed (fixed) » Needs work

I'll add in some help text to the output so other users will have a general idea on what to do.

mikeytown2’s picture

Status: Needs work » Fixed

committed

keva’s picture

thanks - that extra bit of text helped.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.