Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Feb 2016
    Location
    Salem, NH
    Posts
    103
    Plugin Contributions
    0

    Default WARNING: An Error occurred, please refresh the page and try again

    Bare with me still new and learning. Myfeatured products and all products page load with error have tried the troubleshooting to no avail was wondering if someone can point me where to go to fix
    http://www.thedragonskeep.net/index....tured_products

    http://www.thedragonskeep.net/index....e=products_all

    Thanks
    Sandria

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: WARNING: An Error occurred, please refresh the page and try again

    You'll want to review the debug logs in your server's /logs/ folder.

    More info: http://www.zen-cart.com/content.php?...-and-try-again
    and http://www.zen-cart.com/content.php?124-blank-page
    .

    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.

  3. #3
    Join Date
    Feb 2016
    Location
    Salem, NH
    Posts
    103
    Plugin Contributions
    0

    Default Re: WARNING: An Error occurred, please refresh the page and try again

    [20-Jul-2016 09:27:58 America/Denver] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 10' at line 1 :: limit 10 ==> (as called by) /home1/thedrah1/public_html/includes/templates/template_default/templates/tpl_modules_products_featured_listing.php on line 23 <== in /home1/thedrah1/public_html/includes/classes/db/mysql/query_factory.php on line 155

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: WARNING: An Error occurred, please refresh the page and try again

    I suspect that the /includes/modules/pages/featured_products/header_php.php file is damaged, or you have multiple header_php.* files in that folder.
    .

    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.

  5. #5
    Join Date
    Feb 2016
    Location
    Salem, NH
    Posts
    103
    Plugin Contributions
    0

    Default Re: WARNING: An Error occurred, please refresh the page and try again

    Thanks

    So, I only have one header_php in featured products here it is do you see any errors I really appreciate your help really want to learn to do this myself. :-)

    PHP Code:
    <?php
    /**Single Listing Template mod v1.8
     * Featured Products header_php.php
     *
     * @package page
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 6912 2007-09-02 02:23:45Z drbyte $
     */
    require(DIR_WS_MODULES zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);
    // display order dropdown
    $disp_order_default PRODUCT_FEATURED_LIST_SORT_DEFAULT;

    require(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));

    $featured_products_array = array();

    $listing_sql "SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call,
                                      p.product_is_always_free_shipping, p.products_qty_box_status,
                                      p.master_categories_id, m.manufacturers_id
                                      FROM (" 
    TABLE_PRODUCTS " p
                                      LEFT JOIN " 
    TABLE_MANUFACTURERS " m on (p.manufacturers_id = m.manufacturers_id), " .
    TABLE_PRODUCTS_DESCRIPTION " pd
                                      LEFT JOIN " 
    TABLE_FEATURED " f on pd.products_id = f.products_id )
                                      WHERE p.products_status = 1 and p.products_id = f.products_id and f.status = 1
                                      AND p.products_id = pd.products_id and pd.language_id = :languagesID " 
    .
    $order_by;

    $listing_sql $db->bindVars($listing_sql':languagesID'$_SESSION['languages_id'], 'integer');
    $featured_products_split = new splitPageResults($featured_products_query_rawMAX_DISPLAY_PRODUCTS_FEATURED_PRODUCTS);

    //check to see if we are in normal mode ... not showcase, not maintenance, etc
      
    $show_submit zen_run_normal();

    $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
      
    'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
      
    'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
      
    'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
      
    'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
      
    'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
      
    'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);

      
    /*                         ,
      'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
      */
      
    asort($define_list);
      
    reset($define_list);
      
    $column_list = array();
      foreach (
    $define_list as $key => $value)
      {
        if (
    $value 0$column_list[] = $key;
      }
    ?>

  6. #6
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,151
    Plugin Contributions
    11

    Default Re: WARNING: An Error occurred, please refresh the page and try again

    Again, it really would help if you would answer the posting tips. You are using a mod for version 1.3.9 but don't say your version of ZC. A lot of changes have been made since 1.3.9

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: WARNING: An Error occurred, please refresh the page and try again

    Quote Originally Posted by Amethyst_fairy View Post
    PHP Code:
    <?php
    /**Single Listing Template mod v1.8
     * Featured Products header_php.php
    That's not how the original Zen Cart file begins, so clearly it's been altered.
    Whoever rewrote this file broke it:

    Note the use of $listing_sql vs $featured_products_split in the code you quoted:
    Quote Originally Posted by Amethyst_fairy View Post
    Code:
    $listing_sql = "SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call,
                                      p.product_is_always_free_shipping, p.products_qty_box_status,
                                      p.master_categories_id, m.manufacturers_id
                                      FROM (" . TABLE_PRODUCTS . " p
                                      LEFT JOIN " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " .
    TABLE_PRODUCTS_DESCRIPTION . " pd
                                      LEFT JOIN " . TABLE_FEATURED . " f on pd.products_id = f.products_id )
                                      WHERE p.products_status = 1 and p.products_id = f.products_id and f.status = 1
                                      AND p.products_id = pd.products_id and pd.language_id = :languagesID " .
    $order_by;
    
    $listing_sql = $db->bindVars($listing_sql, ':languagesID', $_SESSION['languages_id'], 'integer');
    $featured_products_split = new splitPageResults($featured_products_query_raw, MAX_DISPLAY_PRODUCTS_FEATURED_PRODUCTS);
    Now note what the template file is expecting:
    Quote Originally Posted by Amethyst_fairy View Post
    [20-Jul-2016 09:27:58 America/Denver] PHP Fatal error: 1064:You have an error in your SQL syntax;
    ... /includes/templates/template_default/templates/tpl_modules_products_featured_listing.php on line 23 <== in
    Code:
    22  if ($featured_products_split->number_of_rows > 0) {23    $featured_products = $db->Execute($featured_products_split->sql_query);
    In the header file, $listing_sql contains the query
    And $featured_products_split is set to $featured_products_query_raw instead of to $listing_sql ... so instead of generating a complete query all it does is respond to the "limit" syntax for limiting the maximum number of records to display (ie: "limit 10" in your case, as reported in your error log).
    So when the template tries to access $featured_products_split, it gets a broken query, and of course no results.

    Solution: put back the original header_php.php file until you sort out why it had been changed in the first place and obtain/create a proper working version of the customizations you're using ... if you really even need them at all. Most people don't need the change anyway.
    .

    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.

  8. #8
    Join Date
    Feb 2016
    Location
    Salem, NH
    Posts
    103
    Plugin Contributions
    0

    Default Re: WARNING: An Error occurred, please refresh the page and try again

    Sorry so I am using zencart 1.54 and the template is stirling grand. My guess is was probably installed wrong with the orginal installation. I will try putting in the original downloading original files now. I made mistake when we first started site to pay someone to install our store so now learning what has been installed or not. Planning to eventually work on updating to 1.55 Thanks so much for you help.

  9. #9
    Join Date
    Feb 2016
    Location
    Salem, NH
    Posts
    103
    Plugin Contributions
    0

    Default Re: WARNING: An Error occurred, please refresh the page and try again

    OMG thank you so much I download zencart 1.54 transferred using filezilla and bingo it works. Thank you so much for helping me fix it. Website is running so much faster too.
    Thanks
    Sandria

  10. #10
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: WARNING: An Error occurred, please refresh the page and try again

    /**Single Listing Template
    If you find that comment lurking in your files somewhere I recommend you plan to get rid of it on your next upgrade.

    While I made that mod with the best of intentions, it was a very long time ago when I knew even less than I do now, and involves a world of merging/upgrading pain. I long ago stopped trying to support it, it was such a pig and should not be in a site past 1.39.

    I have literally just spent today removing what I hope are the last traces of it for my own 155 upgrade.
    Not that it was broken at all, it was just a lot of non-standard code I wanted out of the way before going responsive.

    It is quicker to just just mod each of the three templates into the same way you want them.

    (The devs are improving things and the pages will all have a common structure in 1.6 anyway.)
    Last edited by DrByte; 1 Aug 2016 at 01:10 AM. Reason: (reworded last sentence for clarity)
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v155 WARNING: An Error occurred, please refresh the page and try again
    By riomaha in forum General Questions
    Replies: 3
    Last Post: 16 Aug 2016, 07:31 PM
  2. v151 WARNING: An Error occurred, please refresh the page and try again
    By pramitha in forum General Questions
    Replies: 5
    Last Post: 12 Jul 2016, 10:25 AM
  3. v150 WARNING: An Error occurred, please refresh the page and try again.
    By l3ackdraft in forum Upgrading to 1.5.x
    Replies: 13
    Last Post: 13 Jun 2016, 10:13 PM
  4. v150 WARNING: An Error occurred, please refresh the page and try again.
    By dochsa in forum General Questions
    Replies: 2
    Last Post: 6 Sep 2012, 08:10 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR