Results 1 to 8 of 8
  1. #1
    Join Date
    May 2005
    Posts
    12
    Plugin Contributions
    0

    Default Search returning errors v1.2.x

    We have found that if you run a search from the sidebox and then from the results page run another search from the sidebox an error is returned. In the Search sidebox enter horse and search. The results page is fine. In the sidebox enter a new term and search and the error below is returned.
    -----------------------------
    Warning: Variable passed to each() is not an array or object in /home/clipart/public_html/includes/application_top.php on line 712

    Warning: Cannot modify header information - headers already sent by (output started at /home/clipart/public_html/includes/application_top.php:712) in /home/clipart/public_html/includes/functions/functions_general.php on line 53
    -----------------------------

    The address of the first search is:
    index.php?main_page=advanced_search_result&search_in_description=1&keyword=horse

    The address of the second page is:
    index.php?main_page=products_general_info&search_in_description=1&keyword=horse& sort=20a&action=multiple_products_add_product

    We are running
    Zen Cart 1.2.7
    Database Patch Level: 1.2.7
    on Linux with MySQL 4.0.25 and PHP 4.4.1
    I am not running any Mods.
    See www.3DClipart.net.

    I do not have a solution for this problem. Suggestions are most welcome.

    Tamara

  2. #2
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Search returning errors

    Just seen your problem, and that is that its not submitting the correct form on the advanced search page. Have you editted the way the page displays? Open up includes/templates/YOUR ACTIVE TEMPLATE/templates/tpl_advanced_search_default.php . DO you have </form> on the penultimate line? The last two lines should be

    </form>
    </div>

    If you close the form on this page correctly, then the search box will then function as it should.

    Absolute

  3. #3
    Join Date
    May 2005
    Posts
    12
    Plugin Contributions
    0

    Default Re: Search returning errors

    No, I haven't made any changes to these pages. I checked the source and the closing </form> is at the bottom. However, there are no <div> tags in the code.

    But the error does not appear to be occurring on advanced_search_result. The problem is in the side block. It appears to redirect to the wrong page.

    Tamara

  4. #4
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Search returning errors

    It doesn't matter where the error is appearing, its the fact that a form is openned for the centre column, so that you can add products, and then another form is openned for the advanced search box. Because you never close the first form, the advance search box is submitting the data to the previous form. This is why when you click search on the advanced search results page, you get multipe_add_products in the url of the page returning the error.

    If you want to see what I mean for yourself, then view the advanced search page, and view the source. Then, in notepad so a search for the word 'form'. That way you can see when the first is openned, and then the second, and then only the second is closed.

    Absolute

  5. #5
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Re: Search returning errors

    The problem is in your tpl_modules_product_listing.php template file.

    I can duplicate the problem on your site by clicking the Animals->Horses category, and then entering anything in the search sidebox and clicking Search.
    The problem is repeatable whenever you have the product-listing page open.

    Thus, the tpl_modules_product_Listing.php file must have the closing </form> tag missing from it.

    In v1.2.7, the last 7 lines of the file are:
    PHP Code:
    <?php
        
    // show_bottom_submit_button
    ?>
    <?php 
    if ($show_top_submit_button == 'true' or $show_bottom_submit_button == 'true') { ?>
    </form>
    <?php ?>
    </table>
    I suspect maybe you have some sort of addon installed or may be some switch setting in the admin area that's causing this.

    At any rate, the problem doesn't exist in v1.3.x
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    May 2005
    Posts
    12
    Plugin Contributions
    0

    Default Re: Search returning errors v1.2.x

    I am afraid that you were both wrong. But, Absolute was closer to the solution than DrByte. First, I had not edited any of the files mentioned. I have done very little editing to this store and do not have any add-on modules running.

    The problem was in tpl_advanced_search_result_default.php. A closing </form> tag needed to be added at line 35.

    Both tpl_advanced_search_default.php and tpl_modules_product_listing.php had the closing form tag in the original files.

    Thank you for pointing me in the right direction.
    Tamara

  7. #7
    Join Date
    Jun 2006
    Posts
    38
    Plugin Contributions
    0

    Default Re: Search returning errors v1.2.x

    I am getting a similar error I have tried to take the advice on board but it is not working and this error is still appearing. If the problem if with the lack of the </form> where do I add it to tpl_advanced_search_result_default.php

    HERE IS THE ERROR

    Warning: Variable passed to each() is not an array or object in /home/content/e/u/r/eurovisionshop/html/includes/application_top.php on line 682

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/e/u/r/eurovisionshop/html/includes/application_top.php:682) in /home/content/e/u/r/eurovisionshop/html/includes/functions/functions_general.php on line 52

  8. #8
    Join Date
    Jun 2006
    Posts
    38
    Plugin Contributions
    0

    Default Re: Search returning errors v1.2.x

    Still I am receiving this error and cannot seem to fix it! Any help would me much appreciated. EP

 

 

Similar Threads

  1. Replies: 14
    Last Post: 13 Aug 2013, 09:14 PM
  2. My admin search returning no results
    By thebigkick in forum Customization from the Admin
    Replies: 13
    Last Post: 22 May 2012, 09:40 PM
  3. Search/Advanced Search not returning results
    By scottfr in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 6 Apr 2011, 06:08 AM
  4. Search and Advanced search not returning results
    By paisore in forum General Questions
    Replies: 6
    Last Post: 4 Nov 2010, 03:43 PM
  5. Search Function returning no results
    By dsdeiz in forum General Questions
    Replies: 12
    Last Post: 10 Jun 2009, 06:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg