Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    May 2005
    Location
    Pennsylvania
    Posts
    38
    Plugin Contributions
    1

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

    OK, I need some help, and I am not sure if this is the correct spot.
    I have upgraded to v1.5.

    I am doing a re-write for purchase orders, which is essential for my clients store.

    everything up to this point is working fine until i try to view the order in admin.

    I have traced my error to the order class in admin.

    I have successfully added a new column in zen_orders however under function query, when I insert the purchase_order_number. It just crashes the view/edit order.

    original
    Code:
        function query($order_id) {
          global $db;
          $order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,
                                        customers_suburb, customers_city, customers_postcode, customers_id,
                                        customers_state, customers_country, customers_telephone,
                                        customers_email_address, customers_address_format_id, delivery_name,
                                        delivery_company, delivery_street_address, delivery_suburb,
                                        delivery_city, delivery_postcode, delivery_state, delivery_country,
                                        delivery_address_format_id, billing_name, billing_company,
                                        billing_street_address, billing_suburb, billing_city, billing_postcode,
                                        billing_state, billing_country, billing_address_format_id,
                                        coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,
                                        cc_type, cc_owner, cc_number, cc_expires, currency,
                                        currency_value, date_purchased, orders_status, last_modified,
                                        order_total, order_tax, ip_address
                                 from " . TABLE_ORDERS . "
                                 where orders_id = '" . (int)$order_id . "'");
    after i insert purchase order
    Code:
        function query($order_id) {
          global $db;
          $order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,
                                        customers_suburb, customers_city, customers_postcode, customers_id,
                                        customers_state, customers_country, customers_telephone,
                                        customers_email_address, customers_address_format_id, delivery_name,
                                        delivery_company, delivery_street_address, delivery_suburb,
                                        delivery_city, delivery_postcode, delivery_state, delivery_country,
                                        delivery_address_format_id, billing_name, billing_company,
                                        billing_street_address, billing_suburb, billing_city, billing_postcode,
                                        billing_state, billing_country, billing_address_format_id,
                                        coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,
                                        cc_type, cc_owner, cc_number, cc_expires, currency,
                                        currency_value, date_purchased, orders_status, last_modified,
                                        order_total, order_tax, ip_address, purchase_order_number
                                 from " . TABLE_ORDERS . "
                                 where orders_id = '" . (int)$order_id . "'");
    i get "WARNING: An Error occurred, please refresh the page and try again." when I try to look at the order in admin.

    Help what am I doing wrong or missing.

    Thanks
    My modules: Purchase Order Basic
    Mike

  2. #2
    Join Date
    Jan 2004
    Posts
    63,678
    Blog Entries
    5
    Plugin Contributions
    184

    Default Re: Warning error ... I need your help

    Quote Originally Posted by l3ackdraft View Post
    "WARNING: An Error occurred, please refresh the page and try again."
    A search in the FAQs for your error message brings up this article: http://tutorials.zen-cart.com/index.php?article=412
    .

    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
    May 2005
    Location
    Pennsylvania
    Posts
    38
    Plugin Contributions
    1

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

    Well let me ask you this Doc.
    Can you tell me or point me into a direction, where i can include the the purchase_order_number from the sql without "hacking" the orders.php class file.
    Is this even possible.
    My modules: Purchase Order Basic
    Mike

  4. #4
    Join Date
    Jan 2004
    Posts
    63,678
    Blog Entries
    5
    Plugin Contributions
    184

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

    What's the actual SQL error message?

    You can't merely add a random field name to a query if that field doesn't exist in the table you're querying. So, if you're getting an SQL error that tells you a certain field doesn't exist, then ... well ... it doesn't exist. Maybe you've got a typo on the field name. Maybe you added the field to the wrong table or the wrong database. All kinds of things could be wrong with what you've done. Without the actual SQL error, it's just a guess.

    As for whether you need to hack the core code, that all depends on whether you need the functionality you're hacking into the code. Maybe you can live without it? If not, then unless there's a notifier hook in the code you'll need to alter the code. In v1.x there aren't many notifier hooks in the admin side, for technical reasons.
    .

    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
    Jun 2007
    Location
    Eustis, Florida, USA, EARTH
    Posts
    462
    Plugin Contributions
    0

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

    I just upgraded from v1.39g to 1.5 and I experienced the same problem.

    I did as DR recommended and checked the cache log files. It told me that there was no order_status file in DB. I updated the db sucessfully but for some reason order_status disappeared.

    I have updated 5 other sites and never experienced the probelm.

    I just copied the order_status file from a working v1.5 DB thru my control panel phpmyadmin.

    Check your cache log files, its probably something very similar.

  6. #6
    Join Date
    Mar 2007
    Location
    sunny Florida, USA
    Posts
    81
    Plugin Contributions
    0

    Have a Drink Re: WARNING: An Error occurred, please refresh the page and try again.

    Just an FYI for anyone having this issue, here's what happened to me and why.

    I was getting this error as well, after making a change to allow for PHP to run within EZ-Pages (private site, no security risks that are major - beware when doing this, however).

    The error, after viewing the log files in /cache turned out to be that the database I was referring to within my PHP code was a different one than Zen uses, and it was throwing an error from the query_factory.php file. So, I prefixed the tables from my foreign database and imported them to the database running Zen (different prefix so that anyone would know at a glance that they're not zen tables) and voila!, no more error displayed and all looks swell.

    The moral of the story is: this project (Zen) is simply wonderful. The community is helpful and if you are diligent and read everything about any problems which others experience which are at all *similar* to yours, you'll likely find the answer.

    Thank you Zen team...coffee's on me come payday.

    -R
    Last edited by BouncerFL; 29 Nov 2012 at 09:05 PM. Reason: added URL for reference
    ++++++++++++++++
    Subtle as the 'b' in subtle.

  7. #7
    Join Date
    Jun 2007
    Location
    Nashville, TN
    Posts
    32
    Plugin Contributions
    1

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

    So that you can see the error more clearly, try this http://www.zen-cart.com/content.php?...rror_reporting


    It's a geek thing. If I had to explain it, you wouldn't understand.

  8. #8
    Join Date
    Jun 2007
    Location
    Eustis, Florida, USA, EARTH
    Posts
    462
    Plugin Contributions
    0

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

    Hacked. Somehow thru csf they got me.

    I had done some research because mysql was effected. One suggestion was to delete the ibdata files. Well, I saved them locally and then deleted them on the server. .frm files were not touched. I have since restored the original ibdata files.


    Nothing really damaged though.

    but pages arent loading. log says missing table. Ordinarilly not a problem. But its CEON uri. Install dow not come with tables. It creates them.

    I checked the server, and they are there in var/lib/mysql. In phpmyadmin, table is named but when I click on it it says missing table.

    So. How can I refresh phpmyadmin to pickup the tables?
    Last edited by pixelpadre; 6 Jun 2016 at 09:59 PM.
    ZC v1.5.4 "I was so much older then...I'm younger than that now" Cut the umbilical cord with webhosts after 20 years. FREEDOM!

  9. #9
    Join Date
    Jan 2004
    Posts
    63,678
    Blog Entries
    5
    Plugin Contributions
    184

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

    Quote Originally Posted by pixelpadre View Post
    I had done some research because mysql was effected. One suggestion was to delete the ibdata files. Well, I saved them locally and then deleted them on the server. .frm files were not touched. I have since restored the original ibdata files.


    Nothing really damaged though.

    but pages arent loading. log says missing table. Ordinarilly not a problem. But its CEON uri. Install dow not come with tables. It creates them.

    I checked the server, and they are there in var/lib/mysql. In phpmyadmin, table is named but when I click on it it says missing table.

    So. How can I refresh phpmyadmin to pickup the tables?
    phpMyAdmin simply reports what it reads from MySQL.
    And MySQL usually reports everything automatically, except occasionally when things are damaged.
    Sometimes restarting MySQL is enough.

    Sometimes repairing the tables manually from the command-line is necessary:
    Code:
    mysqlcheck --all-databases -r #repair
    .

    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.

  10. #10
    Join Date
    Jun 2007
    Location
    Eustis, Florida, USA, EARTH
    Posts
    462
    Plugin Contributions
    0

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

    Yea i had already tried the repair. All that did was show me all the bad tables. Its weird how all of the zc databases only had the ceon table effected. I have 5-6 zc installs
    ZC v1.5.4 "I was so much older then...I'm younger than that now" Cut the umbilical cord with webhosts after 20 years. FREEDOM!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. WARNING: An Error occurred, please refresh the page and try again
    By Amethyst_fairy in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 1 Aug 2016, 02:45 AM
  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. v151 Warning: An Error occurred, please refresh the page and try again...
    By Sellerz in forum Installing on a Windows Server
    Replies: 2
    Last Post: 4 Nov 2012, 03:12 AM
  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
  5. v150 WARNING: An Error occurred, please refresh the page and try again.
    By jo54iv in forum General Questions
    Replies: 1
    Last Post: 30 Apr 2012, 09:45 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