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.

Search embed acting weird

November 12, 2008 12:33pm

Subscribe [2]
  • #1 / Nov 12, 2008 12:33pm

    rrainier

    16 posts

    hi, i have a simple search embed which used to work on my devbox, i moved my site to a staging box and my search embed contains weird or old code perhaps.  Note, it only appears on some templates, other templates are fine. To illustrate, here’s the old code showing in one template on render:

    <h2>Search</h2>
    <p><form method="post" action="http://localhost/Xengine/index.php"  ><br />
    <div><br />
    <input type="hidden" name="ACT" value="19" /></p>
    
    <p><input type="hidden" name="XID" value="6fa76e9feeb7ac293700bea6e1a102e985d1fafd" /><br />
    <input type="hidden" name="RP" value="search/results" /><br />
    <input type="hidden" name="NRP" value="" /><br />
    <input type="hidden" name="RES" value="" /><br />
    <input type="hidden" name="status" value="" /><br />
    <input type="hidden" name="weblog" value="" /><br />
    <input type="hidden" name="search_in" value="everywhere" /><br />
    <input type="hidden" name="where" value="all" /><br />
    <input type="hidden" name="site_id" value="1" /><br />
    </div></p>
    
    <p>here's the good code rendering on other templates:</p>
    
    <p>    </p><h2>Search</h2>
    <p><form method="post" action="http://192.168.1.15/demo/index.php"  ><br />
    <div class='hiddenFields'><br />
    <input type="hidden" name="ACT" value="19" /><br />
    <input type="hidden" name="XID" value="2ec98a1f70ef5f6db6149c2e882fe0f627e6fa0c" /><br />
    <input type="hidden" name="RP" value="demosite&#47;results" /><br />
    <input type="hidden" name="NRP" value="" /><br />
    <input type="hidden" name="RES" value="" /></p>
    
    <p><input type="hidden" name="status" value="" /><br />
    <input type="hidden" name="weblog" value="Dependable" /><br />
    <input type="hidden" name="search_in" value="titles" /><br />
    <input type="hidden" name="where" value="all" /><br />
    <input type="hidden" name="site_id" value="1" /><br />
    </div>

    and the embed on all templates is:

    {embed="demosite_embeds/search"}

    my actions:  1. cleared all cached data
            2. re-saved the suspect template/s
            3. cleared all revision history of embed template
            4. ran out of ideas :(

    thanks for any help,
    ray

  • #2 / Nov 12, 2008 1:11pm

    Sue Crocker

    26054 posts

    Ray, the two searches aren’t the same. One is searching in just titles, and is restricted to a weblog called Dependable.

    What’s wrong with the embed?

  • #3 / Nov 12, 2008 1:28pm

    rrainier

    16 posts

    hi sue, here’s the embed:

    <h2>Search</h2>
    <p>{exp:search:simple_form search_in="titles" weblog="{agency_weblog}" result_page="demosite/results"}</p>
    
    <p><br />
    <input type="text" name="keywords" id="keywords" value="" class="text" size="20" maxlength="100" /><br />
    <input type="submit" value="submit" class="submit" /></p>
    
    <p><br />
    {/exp:search:simple_form}

    {agency_weblog} is pre-defined as an entry in the $global_vars array in the path.php

    basically, this is only happening after i moved the site to staging.  i started with copying the database to the staging database with a new name == demo db, proceeded to rename the site to demosite, etc. everything seems to be working fine except for these things being suddenly out of synch.

    another observation is i found out that some templates are not rendering css correctly, i compared the stylesheet versions from my devbox and staging and they are NOT the same.  my assumption was the versions in these stylesheets should be the same but devbox stylesheet v.122651869 is NOT equal to staging stylesheet v.1220519554. 

    i applied a workaround for the search by copy/paste the embed code into the template :(  that got it working but the stylesheet issue i don’t know how to proceed.

    pls. let me know if i’m missing something.

    thanks!

  • #4 / Nov 12, 2008 1:37pm

    Sue Crocker

    26054 posts

    I’m still not understanding what the problem is with the embedded search form. What is wrong with it?

    What I’d do with the CSS template is to copy over manually the content from your staging site.

  • #5 / Nov 12, 2008 1:48pm

    rrainier

    16 posts

    The embedded search form is basically rendering two different versions of the code in different templates on the staging site, as i’ve shown in my first post.  The same thing i suspect that’s happening on the stylesheet issue. i apologize if i didnt clarify the issue.

    thanks

  • #6 / Nov 12, 2008 3:29pm

    Sue Crocker

    26054 posts

    Are you using Save Templates as Files by any chance?

  • #7 / Nov 12, 2008 4:54pm

    rrainier

    16 posts

    I do not know, can you clarify?

  • #8 / Nov 12, 2008 5:02pm

    rrainier

    16 posts

    Allow Templates to be Saved as Files? No

  • #9 / Nov 12, 2008 9:32pm

    Greg Aker

    6022 posts

    can you take the code you posted above, create a new template and embed that search template.  Does it render correctly then?

  • #10 / Nov 13, 2008 1:03am

    rrainier

    16 posts

    i created a blank template and pasted the embed.  verified the source as correct. the target url is not localhost but the correct ip-addr host.  so, it rendered correctly.

  • #11 / Nov 13, 2008 11:33am

    Greg Aker

    6022 posts

    so all is well and we chalk it up to gremlins?  😊

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

ExpressionEngine News!

#eecms, #events, #releases