ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

channel entries search only working if i resave my entries?

August 15, 2011 8:39pm

Subscribe [2]
  • #1 / Aug 15, 2011 8:39pm

    Joobs

    362 posts

    I have a multi lingual site, i’m using the channel search parameter to filter out pages from certain languages of the site.

    However, i am finding that as soon as i add in the search parameter no entries will display.  I am now finding that if i resave the entry it then works as expected.

    So the code below displays no results, until i resave my entry.

    {exp:channel:entries site="site1" channel="products" limit="1" disable="member_data|pagination" dynamic="no" url_title="{segment_3}" search:product-exclude="not {country_code}"}
    <h1>{title}</h1>
    {if no_results}
    no results
    {/if}
    {/exp:channel:entries}

    Why is this happening? Bug?

    v2.2.1 - 20110630

  • #2 / Aug 16, 2011 11:13am

    Kevin Smith

    4784 posts

    Hi Joobs,

    Before we start testing for a bug in this version, let’s make sure you’re running on the latest version EE, which is 2.2.2 at the time of writing this.

    Now, walk me through the exact process you go through during the entry publication and testing process, everything from when you initially submit an entry, when you resave it, when you load the template with the search parameter, etc. I’ll need to be able to exactly reproduce the problem on my end to determine if it’s a bug.

    Thanks!

  • #3 / Aug 19, 2011 6:55am

    Joobs

    362 posts

    I can’t update the site at the moment, but have some more info on the issue.

    I created a PT Checkbox field which is used to filter (exclude) some entries from certain languages.  I created this field after most of the entries were already created.

    Looking at the database i can see the data for this field is set to NULL until i resave the entry where it resets to blank (or has data in it).  Then the search works.

    Looks like I am running into something like this issue:

    https://support.ellislab.com/bugs/detail/15752/

    But i didn’t understand how to fix it, there are quite a lot of entries so resaving isnt the preferred an option.

  • #4 / Aug 22, 2011 3:41pm

    Lisa Wess

    20502 posts

    Hi, Joobs,

    This is fixed in 2.2.2, so I would strongly recommend updating.  If you want to apply the bug fix separately, the comment by Wes with the instructions is in that bug report.  Simply open the file he indicates, find the line number, and insert the code as he instructs.

    Do make a backup of that file first.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases