Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jan 2011
    Posts
    196
    Plugin Contributions
    0

    red flag Blank Page after Placing an Order

    Customers get following message on a blank screen after hitting order submit button:

    'WARNING: An error occurred. Please refresh the page and try again"

    The actual order DOES go thru and I also get the order confirmation email. I am using Paypal payment modules, which handle transactions without any errors.

    When I look in to the error logs, I have following errors:


    [12-Apr-2016 13:09:41 America/New_York] PHP Warning: Illegal string offset 'cost' in /home/*****/public_html/includes/classes/order.php on line 355

    [12-Apr-2016 13:19:58 America/New_York] PHP Fatal error: 1146:Table '******.zen_orders' doesn't exist :: SELECT * FROM zen_orders
    WHERE orders_id = 7968
    LIMIT 1 in /home/******/public_html/includes/classes/db/mysql/query_factory.php on line 120

    [12-Apr-2016 13:20:05 America/New_York] PHP Warning: Creating default object from empty value in /home/*****/public_html/ipn_main_handler.php on line 354
    [12-Apr-2016 13:20:05 America/New_York] ERROR: Failed sending email to: " " <> with subject: "Order Confirmation No: 7969" (failed validation)

    [12-Apr-2016 13:30:34 America/New_York] PHP Warning: Creating default object from empty value in /home/*****/public_html/includes/modules/shipping_estimator.php on line 92

  2. #2
    Join Date
    Jan 2011
    Posts
    196
    Plugin Contributions
    0

    Default Re: Blank Page after Placing an Order

    /home/*****/public_html/includes/classes/order.php

    Code:
       $this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID,
                            'currency' => $_SESSION['currency'],
                            'currency_value' => $currencies->currencies[$_SESSION['currency']]['value'],
                            'payment_method' => $GLOBALS[$class]->title,
                            'payment_module_code' => $GLOBALS[$class]->code,
                            'coupon_code' => $coupon_code->fields['coupon_code'],
        //                          'cc_type' => (isset($GLOBALS['cc_type']) ? $GLOBALS['cc_type'] : ''),
        //                          'cc_owner' => (isset($GLOBALS['cc_owner']) ? $GLOBALS['cc_owner'] : ''),
        //                          'cc_number' => (isset($GLOBALS['cc_number']) ? $GLOBALS['cc_number'] : ''),
        //                          'cc_expires' => (isset($GLOBALS['cc_expires']) ? $GLOBALS['cc_expires'] : ''),
        //                          'cc_cvv' => (isset($GLOBALS['cc_cvv']) ? $GLOBALS['cc_cvv'] : ''),
                            'shipping_method' => (is_array($_SESSION['shipping']) ? $_SESSION['shipping']['title'] : $_SESSION['shipping']),
                            'shipping_module_code' => (isset($_SESSION['shipping']['id']) && strpos($_SESSION['shipping']['id'], '_') > 0 ? $_SESSION['shipping']['id'] : $_SESSION['shipping']),
                            'shipping_cost' => $_SESSION['shipping']['cost'],
                            'subtotal' => 0,
                            'shipping_tax' => 0,
                            'tax' => 0,
                            'total' => 0,
                            'tax_groups' => array(),
                            'comments' => (isset($_SESSION['comments']) ? $_SESSION['comments'] : ''),
                            'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR']
                            );
    Line 355 is:
    Code:
    'shipping_cost' => $_SESSION['shipping']['cost'],

  3. #3
    Join Date
    Jan 2011
    Posts
    196
    Plugin Contributions
    0

    Default Re: Blank Page after Placing an Order

    /home/******/public_html/includes/classes/db/mysql/query_factory.php
    Code:
      function show_error() {
        if ($this->error_number == 0 && $this->error_text == DB_ERROR_NOT_CONNECTED && !headers_sent() && file_exists('nddbc.html') ) include('nddbc.html');
        echo '<div class="systemError">';
        if (defined('STRICT_ERROR_REPORTING') && STRICT_ERROR_REPORTING == true) 
        {
          echo $this->error_number . ' ' . $this->error_text;
          echo '<br />in:<br />[' . (strstr($this->zf_sql, 'db_cache') ? 'db_cache table' : $this->zf_sql) . ']<br />';
        } else {
          echo 'WARNING: An Error occurred, please refresh the page and try again.';	
        }
        trigger_error($this->error_number . ':' . $this->error_text . ' :: ' . $this->zf_sql, E_USER_ERROR);
        if (defined('IS_ADMIN_FLAG') && IS_ADMIN_FLAG==true) echo 'If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.<br />';
        echo '</div>';
      }
    Line 120 is:
    Code:
    trigger_error($this->error_number . ':' . $this->error_text . ' :: ' . $this->zf_sql, E_USER_ERROR);

  4. #4
    Join Date
    Jan 2011
    Posts
    196
    Plugin Contributions
    0

    Default Re: Blank Page after Placing an Order

    /home/*****/public_html/ipn_main_handler.php

    Code:
           ipn_debug_email('Breakpoint: 5k - OSH update done');
            $order->create_add_products($insert_id, 2);
            ipn_debug_email('Breakpoint: 5L - adding products');
            $_SESSION['order_number_created'] = $insert_id;
            $GLOBALS[$_SESSION['payment']]->transaction_id = $_POST['txn_id'];
            $zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_CREATE_ADD_PRODUCTS');
            $order->send_order_email($insert_id, 2);
            ipn_debug_email('Breakpoint: 5m - emailing customer');
            $zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_SEND_ORDER_EMAIL');
    Line 354:
    Code:
            $GLOBALS[$_SESSION['payment']]->transaction_id = $_POST['txn_id'];

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

    Default Re: Blank Page after Placing an Order

    Quote Originally Posted by sle39lvr View Post
    [12-Apr-2016 13:09:41 America/New_York] PHP Warning: Illegal string offset 'cost' in /home/*****/public_html/includes/classes/order.php on line 355
    That's a result of using PHP 5.4 or newer with an old version of Zen Cart that was designed before PHP 5.4 was created.
    In modern versions of Zen Cart there are a lot of arrays that have been updated and improved for compatibility with modern PHP versions. You need to upgrade your Zen Cart if you're going to continue upgrading your PHP.



    Quote Originally Posted by sle39lvr View Post
    [12-Apr-2016 13:30:34 America/New_York] PHP Warning: Creating default object from empty value in /home/*****/public_html/includes/modules/shipping_estimator.php on line 92
    I'm pretty sure this one is also related to the PHP version mismatch.
    .

    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
    Jan 2011
    Posts
    196
    Plugin Contributions
    0

    Default Re: Blank Page after Placing an Order

    Understood.

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

    Default Re: Blank Page after Placing an Order

    Quote Originally Posted by sle39lvr View Post
    Customers get following message on a blank screen after hitting order submit button:

    'WARNING: An error occurred. Please refresh the page and try again"

    [12-Apr-2016 13:19:58 America/New_York] PHP Fatal error: 1146:Table '******.zen_orders' doesn't exist :: SELECT * FROM zen_orders
    WHERE orders_id = 7968
    LIMIT 1 in /home/******/public_html/includes/classes/db/mysql/query_factory.php on line 120
    That fatal error is the cause of the blank screen.

    Chances are you've got some custom code or poorly-written plugins that are looking for a table named "zen_orders" when the rest of your site is using tables names without the "zen_" prefix on those tables.

    Normally one would use the PHP constant named TABLE_ORDERS to properly combine the global table-prefix value with the expected table name suffix instead of presupposing the actual table name.

    In this case the query_factory.php file is only the messenger. It's only executing the query, not preparing it. I'm guessing that you've got something added to your site to do extra "stuff" after orders are created. This could mean custom code in a lot of places, such as:
    /includes/modules/pages/checkout_process/*.php
    /includes/modules/pages/checkout_success/*.php
    /includes/classes/observers/*.php
    /includes/templates/your_template_name/templates/tpl_checkout_success_default.php
    and perhaps others.
    .

    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
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: Blank Page after Placing an Order

    You could install the myDebug Backtrace plugin to see where the mal-formed call to the queryFactory class is coming from.

  9. #9
    Join Date
    Jan 2011
    Posts
    196
    Plugin Contributions
    0

    Default Re: Blank Page after Placing an Order

    Just updated to 1.5.5. The issue still exists.

    Name:  Screen_Shot_2016_04_26_at_6_12_31_PM.jpg
Views: 99
Size:  69.9 KB

  10. #10
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,691
    Plugin Contributions
    9

    Default Re: Blank Page after Placing an Order

    you need to post the contents of your error logs.

    in addition, i think the problem is still related to the sql statement: "select * from zen_orders... "

    can you track down what file contains that bit of code and post its contents?
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Blank page after updating an order status
    By tundria in forum General Questions
    Replies: 3
    Last Post: 3 Mar 2012, 04:34 PM
  2. checkout_process is a white blank page after credit card order
    By psychosis in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 1 Nov 2010, 05:56 AM
  3. Blank page after step 3 of order is completed
    By mgrunk in forum Managing Customers and Orders
    Replies: 0
    Last Post: 8 Apr 2009, 12:58 AM
  4. Page Hangs After Placing Order (Need Help)
    By tmcashan in forum General Questions
    Replies: 7
    Last Post: 7 Jun 2007, 09:14 PM

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