Upgraded to 1.2 & Search still not working right

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Crafty
Forum Members
Forum Members
Posts: 19
Joined: Mon Sep 24, 2007 10:14 pm

Upgraded to 1.2 & Search still not working right

Post by Crafty »

I had been getting an error when I used the search function; while it did generate the correct results, it was listing an error on the screen as well on top of all the normal content.

I had hoped by upgrading it would go away - no such luck.

I get this error the first time the search function is used by a site visitor (after that, everything works fine):
Warning: Parameter searchinput is not known... dropped in /home/plt103/public_html/thecraftytipster.com/lib/misc.functions.php on line 1281


I know there was a previous thread with a similar error message. I had tried those ideas with the old version to no avail and am looking for something new to try.

Please help, search was the main reason I wanted to use a CMS instead of hand coding for this site.

If I can't get a solution to fix the search issue, is there at least a way to block the error message from appearing on top of the rest of the content?
reneh
Dev Team Member
Dev Team Member
Posts: 446
Joined: Tue Nov 28, 2006 8:39 pm

Re: Upgraded to 1.2 & Search still not working right

Post by reneh »

I don't see any  "searchinput"  parameter in my search...
Are you sure you have not made any error in your Search Template?

The original Search Template looks like this:

{$startform}
{$label}: {$inputbox}{$hidden}
{$endform}
ReneH 8-)
A search will save you hours waiting for an answer! Image
Crafty
Forum Members
Forum Members
Posts: 19
Joined: Mon Sep 24, 2007 10:14 pm

Re: Upgraded to 1.2 & Search still not working right

Post by Crafty »

reneh wrote: I don't see any  "searchinput"  parameter in my search...
Are you sure you have not made any error in your Search Template?

The original Search Template looks like this:

{$startform}
{$label}: {$inputbox}{$hidden}
{$endform}

I haven't touched the search template.

I thought all I had to do was put  {search} and it did the rest for me. My template looked different from yours so I changed it - no luck. When I said return to default it set it back to what mine had originally

{$startform}
{$label}: {$inputbox}
{if isset($hidden)}{$hidden}{/if}

{$endform}

Any other ideas? Anyone?
Crafty
Forum Members
Forum Members
Posts: 19
Joined: Mon Sep 24, 2007 10:14 pm

Re: Upgraded to 1.2 & Search still not working right

Post by Crafty »

Doesn't anyone have any ideas? Search capability was such a major component of my site's plan - to not have it would be a real blow.

Please, anyone?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Upgraded to 1.2 & Search still not working right

Post by calguy1000 »

Looks like you have an upgrade issue.  I know what would cause this error message, and I checked the code to Search and the appropriate SetParameterType line is in the code.

In the file Search.module.php in the function SetParameters there is this line:

Code: Select all

$this->SetParameterType('searchinput',CLEAN_STRING);
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Crafty
Forum Members
Forum Members
Posts: 19
Joined: Mon Sep 24, 2007 10:14 pm

Re: Upgraded to 1.2 & Search still not working right

Post by Crafty »

I'm sorry, I don't understand what you are trying to tell me. Is part of your answer missing?

My Search.module.php has that exact line in the SetParameters function.
function SetParameters()
  {
    // This module does not restrict unknown parameters
    // due to the wildcard/regular expression matching stuff of the
    // passthru_* parameters.
    $this->RestrictUnknownParams();
    $this->CreateParameter('inline','false',$this->Lang('param_inline'));
    $this->SetParameterType('inline',CLEAN_STRING);

    $this->CreateParameter('passthru_*','null',$this->Lang('param_passthru'));
        $this->SetParameterType(CLEAN_REGEXP.'/passthru_.*/',CLEAN_STRING);

    $this->CreateParameter('modules','null',$this->Lang('param_modules'));
    $this->SetParameterType('modules',CLEAN_STRING);

    $this->CreateParameter('resultpage', 'null', $this->Lang('param_resultpage'));
    $this->SetParameterType('resultpage',CLEAN_STRING);
    $this->CreateParameter('searchtext','null',$this->Lang('param_searchtext'));
    $this->SetParameterType('searchtext',CLEAN_STRING);
    $this->SetParameterType('searchinput',CLEAN_STRING);

    $this->CreateParameter('submit',$this->Lang('searchsubmit'),
                          $this->Lang('param_submit'));
    $this->SetParameterType('submit',CLEAN_STRING);
    $this->SetParameterType('origreturnid',CLEAN_INT);
  }
Thank you for trying to help me with this.
alby

Re: Upgraded to 1.2 & Search still not working right

Post by alby »

Crafty wrote: I'm sorry, I don't understand what you are trying to tell me. Is part of your answer missing?

My Search.module.php has that exact line in the SetParameters function.
Have you other modules with form?

Try with a very CLEAN template with search tag only:

Code: Select all

<__html>
<head>
{metadata}
</head>
</__body>
 {search}<p></p>{content}
<__body>
</__html>
Alby
Last edited by alby on Thu Oct 25, 2007 4:03 pm, edited 1 time in total.
Crafty
Forum Members
Forum Members
Posts: 19
Joined: Mon Sep 24, 2007 10:14 pm

Re: Upgraded to 1.2 & Search still not working right

Post by Crafty »

I don't have any other modules with forms.

Are you saying create a template and page that only has search on it? If so, I tried that and the search doesn't return anything it just refreshes the search and submit boxes.
alby

Re: Upgraded to 1.2 & Search still not working right

Post by alby »

Crafty wrote: I don't have any other modules with forms.

Are you saying create a template and page that only has search on it? If so, I tried that and the search doesn't return anything it just refreshes the search and submit boxes.
Yes, I forgot content tag in my example  :-[

Alby
Crafty
Forum Members
Forum Members
Posts: 19
Joined: Mon Sep 24, 2007 10:14 pm

Re: Upgraded to 1.2 & Search still not working right

Post by Crafty »

Ahh, that works better.  :D

This doesn't create the warning error and appears to work perfectly. So, I guess that means my installation is working right but something in my template or stylesheet is fouling things up?

I'm using the Andreas03Lft template. Any suggestions on what is causing this and what I need to fix?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Upgraded to 1.2 & Search still not working right

Post by Dr.CSS »

Got Link?

I believe that was one I did...
Crafty
Forum Members
Forum Members
Posts: 19
Joined: Mon Sep 24, 2007 10:14 pm

Re: Upgraded to 1.2 & Search still not working right

Post by Crafty »

Sure, it's http://www.thecraftytipster.com

I'd appreciate any suggestions as Google has already indexed the site and even began sending me a tiny bit of traffic. When you want a site indexed fast it takes forever, when you want it to hide in the shadows a little while it seems to get indexed quickly. lol
Crafty
Forum Members
Forum Members
Posts: 19
Joined: Mon Sep 24, 2007 10:14 pm

Re: Upgraded to 1.2 & Search still not working right

Post by Crafty »

Any chance you've looked into this yet?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Upgraded to 1.2 & Search still not working right

Post by Dr.CSS »

No problem with the HTML or CSS, maybe the goggle adsence is throwing it altho I don't see the ad...
Crafty
Forum Members
Forum Members
Posts: 19
Joined: Mon Sep 24, 2007 10:14 pm

Re: Upgraded to 1.2 & Search still not working right

Post by Crafty »

It was doing this before I added the advertising.

I played around a bit moving the search box around the template.

It works fine in the main body of the page.

It works fine if put before the menu in the sidebar.

It breaks when placed below the menu in the sidebar (before and after ads) and in the News section.


Seems to be somehow related to the fly-out menu. I could put it somewhere else, but it seems to make the most sense to put search under the menu.  :(
Last edited by Crafty on Mon Oct 29, 2007 7:42 pm, edited 1 time in total.
Locked

Return to “[locked] Installation, Setup and Upgrade”