Category search brings up error

Discussion in 'General PHP' started by Rupert Avery, Mar 19, 2012.

  1. Rupert Avery

    Rupert Avery New Member

    Joined:
    Nov 24, 2011
    Messages:
    157
    Likes Received:
    4
    Hey, on my site if you select a category from the drop down menu and then search for something it brings up this error

    wondering if anyone can help :)
     
  2. Rupert Avery

    Rupert Avery New Member

    Joined:
    Nov 24, 2011
    Messages:
    157
    Likes Received:
    4
    this is fixed thank you!
     
  3. drakky20

    drakky20 New Member

    Joined:
    Mar 11, 2012
    Messages:
    252
    Likes Received:
    20
    hi I have the same problem what is the fix please?
     
  4. Rupert Avery

    Rupert Avery New Member

    Joined:
    Nov 24, 2011
    Messages:
    157
    Likes Received:
    4
    Let me find the fix, ONe of the guys here told me :)
     
  5. drakky20

    drakky20 New Member

    Joined:
    Mar 11, 2012
    Messages:
    252
    Likes Received:
    20
    great thanks
     
  6. Rupert Avery

    Rupert Avery New Member

    Joined:
    Nov 24, 2011
    Messages:
    157
    Likes Received:
    4
    I cant find it.. trying to find all the people i talked to on the two dates but just cant figure it out :S
     
  7. Rupert Avery

    Rupert Avery New Member

    Joined:
    Nov 24, 2011
    Messages:
    157
    Likes Received:
    4
    okay I have compared a new and old file and found only one difference.

    In search.php find this
    Code:
    $catalist = '(';
    		$catalist .= implode(',', $childarray);
    		$catalist .= ')';
    		$catSQL = " AND (category IN " . $catalist;
    		if ($system->SETTINGS['extra_cat'] == 'y')
    		{
    			$catSQL .= " OR secondcat IN " . $catalist;
    		}
    then add the Red text

    Code:
    $catalist = '(';
    		$catalist .= implode(',', $childarray);
    		$catalist .= ')';
    		$catSQL = " AND (category IN " . $catalist . [COLOR="red"]")"[/COLOR];
    		if ($system->SETTINGS['extra_cat'] == 'y')
    		{
    			$catSQL .= " OR secondcat IN " . $catalist;
    		}
    It should be about link 51... I think this is what was missing....
     
    drakky20 likes this.
  8. drakky20

    drakky20 New Member

    Joined:
    Mar 11, 2012
    Messages:
    252
    Likes Received:
    20
    damn lol need this dont wanna have to work it out myself
     
  9. drakky20

    drakky20 New Member

    Joined:
    Mar 11, 2012
    Messages:
    252
    Likes Received:
    20


    Thanks heaps seems to work now :)
     
    Rupert Avery likes this.
  10. Rupert Avery

    Rupert Avery New Member

    Joined:
    Nov 24, 2011
    Messages:
    157
    Likes Received:
    4
    NP :) I really cant remember who helped me! another problem I got help with was the "hot Items" code? did you get yours sorted?
     
  11. drakky20

    drakky20 New Member

    Joined:
    Mar 11, 2012
    Messages:
    252
    Likes Received:
    20
    is that the thing where the code is $j instead of $i
     
  12. drakky20

    drakky20 New Member

    Joined:
    Mar 11, 2012
    Messages:
    252
    Likes Received:
    20
    while that other fix seems to have worked now in the error log there is an error
    Unknown error type: [8] Undefined index: ERROR on WeBid/cache/tpl_default_search.tpl.php line 6
     
  13. Rupert Avery

    Rupert Avery New Member

    Joined:
    Nov 24, 2011
    Messages:
    157
    Likes Received:
    4
    yes :) Xenon told me about that hehe
     
  14. Rupert Avery

    Rupert Avery New Member

    Joined:
    Nov 24, 2011
    Messages:
    157
    Likes Received:
    4
    I don't get that error.. i dont think..My log has lots of errors because we have blocked all the shipping and payment options
     
  15. drakky20

    drakky20 New Member

    Joined:
    Mar 11, 2012
    Messages:
    252
    Likes Received:
    20
    currently that's the only error we are getting , would really like to clean up any existing errors as we are modifying this a lot and then if we have an error it will be something we have generated not existing , that way we won't be chasing red herrings so to speak
     
  16. Rupert Avery

    Rupert Avery New Member

    Joined:
    Nov 24, 2011
    Messages:
    157
    Likes Received:
    4
    I know what you mean, although we have a lot of the stuff we dont need blocked I would love to find a way to take it out. So I am going to check on specific section. I get a lot of errors for things we have added I need to look in to.. Why cant some wizard fix it all hehe
     
  17. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    4,148
    Likes Received:
    303
    Thats a template cach error (if your making lots of mods you be better to disable the template cach in the settings of admin).

    To fix the error to test first if it comes back do this.

    Login to admin and clear your template cach then while still in admin click tools tab then on purge the error log.

    Run the page again and see if the error returns
     
    Last edited: Apr 2, 2012
    Rupert Avery likes this.
  18. Rupert Avery

    Rupert Avery New Member

    Joined:
    Nov 24, 2011
    Messages:
    157
    Likes Received:
    4
    this fixed my issue :)
     
  19. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    4,148
    Likes Received:
    303
    Great glad to hear it solved your problem sky
     

Share This Page