Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jun 2012
    Posts
    11
    Plugin Contributions
    0

    Default WARNING: An Error occurred, please refresh the page and try again - in Admin-->Config

    I wanted to import a large number of products and customer details from a ZC 1.3.9 shop in a new ZC 1.5.3 shop (new shop has no products/customers yet).

    Did a database dump of the old shop, installed a fresh V1.5.3 on a test server. Than I created an empty database and uploaded the entire DB dump into it.

    Changed the database values in both configure.php files of the fresh V1.5.3 shop and ran the database update (instead of new installation) from its zc-install folder. It complained that the configure.php in the admin folder would not exist (admin folder of the old shop has a different name). Changed its name to simply "admin".

    The database update went through without problems and at the end of the process the admin folder was automatically renamed, but the pre-installation success page showed an incorrect link (shop's index.php) for the admin folder.

    The shop works for the general public (includes folder),I can login, see all the products and customers but when I click on anything below admin --> config I get

    Code:
    WARNING: An Error occurred, please refresh the page and try again
    Renaming the admin folder to the name it used to have in the old shop did not fix the problem.

    Can anyone say what I might have overseen here?
    Last edited by hyperion12; 23 Sep 2014 at 02:28 AM. Reason: forgot something

  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 - in Admin-->Co

    The actual error message explaining what caused that alert on-screen will be found in your site's debug logs, as described here:
    http://www.zen-cart.com/content.php?124-blank-page

    Ref: http://www.zen-cart.com/content.php?...-and-try-again
    .

    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
    Jun 2012
    Posts
    11
    Plugin Contributions
    0

    Default Re: WARNING: An Error occurred, please refresh the page and try again - in Admin-->Co

    It says:

    HTML Code:
    [CODE][19-Sep-2014 05:48:29] PHP Fatal error:  1054:Unknown column 'language_id' in 'where clause' :: select configuration_group_title
                                 from vqkr_configuration_group
                                 where configuration_group_id = '1' AND language_id=1 ==> (as called by) /home/domain.com/public_html/zen1/admin...../configuration.php on line 60 <== in /home/domain.com/public_html/zen1/includes/classes/db/mysql/query_factory.php on line 155[/CODE]
    
    and here is the content of said query_factory.php:
    
        foreach ($backtrace_array as $current_caller) {
          if (strcmp($current_caller['file'], __FILE__) != 0) {
            $query_factory_caller = ' ==> (as called by) ' . $current_caller['file'] . ' on line ' . $current_caller['line'] . ' <==';
            break;
          }
        }
        trigger_error($this->error_number . ':' . $this->error_text . ' :: ' . $this->zf_sql . $query_factory_caller, 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>';
      }
    
      function Execute($zf_sql, $zf_limit = false, $zf_cache = false, $zf_cachetime=0, $remove_from_queryCache = false) {
        // bof: collect database queries[/CODE]
    where this is line 155

    Code:
        trigger_error($this->error_number . ':' . $this->error_text . ' ::
    Last edited by hyperion12; 23 Sep 2014 at 02:46 AM.

  4. #4
    Join Date
    Jun 2012
    Posts
    11
    Plugin Contributions
    0

    Default Re: WARNING: An Error occurred, please refresh the page and try again - in Admin-->Co

    I can phase out the usual suspects:


    MySQL not running
    incorrect DB_xxxxxxx settings in either of your configure.php files

    syntax error in MySQL statements
    an incompatible addon, on an incorrectly-installed addon (such as SQL installation steps not completed properly)
    a hacker attempting to do something rogue or malicious with something on your site, and has been blocked because they've got syntax errors or are attempting to exploit a vulnerability that is NOT a problem on your site
    something wrong with the MySQL engine on your webserver, which your hosting company will likely need to resolve for you


    The syntax error should also not occur here, since the datebase update went through without problems.

    Old shop however had indeed installed query_factory (or is it called cache) to lower the number of request and to improve the loading times since it has many products priced by attributes.
    Last edited by hyperion12; 23 Sep 2014 at 02:56 AM. Reason: unsure which addon

  5. #5
    Join Date
    Jun 2012
    Posts
    11
    Plugin Contributions
    0

    Default Re: WARNING: An Error occurred, please refresh the page and try again - in Admin-->Co

    Since this a new shop in which I only wanted to add existing products, prices, attributes and clients/orders/invoices I would not even mind if I started from fresh install again, only importing the relevant database tables from the converted old database in the new database, if this is easier.....

    Does anyone know which ones they are?

  6. #6
    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 - in Admin-->Co

    Quote Originally Posted by hyperion12 View Post
    It says:

    Code:
    [19-Sep-2014 05:48:29] PHP Fatal error:  1054:Unknown column 'language_id' in 'where clause' :: select configuration_group_title
                                 from vqkr_configuration_group
                                 where configuration_group_id = '1' AND language_id=1 ==> (as called by) /home/domain.com/public_html/zen1/admin...../configuration.php on line 60 <== in /home/domain.com/public_html/zen1/includes/classes/db/mysql/query_factory.php on line 155
    and here is the content of said query_factory.php...
    <removed>
    The error is not in query_factory. That's only "the messenger".
    The error is from the configuration.php script, which is called in your Admin when you're viewing Admin->Configuration->My Store.

    And, when you look at the SQL query, it clearly says "Unknown column 'language_id'".

    Zen Cart doesn't have a "language_id" column in that table ... unless you're using a plugin which has added it.
    And, if you're using a plugin to add it, then you're getting that error because you're using PHP files that expect the database to have that column but you're using a database which doesn't yet have that plugin added to it.

    So ... either put the PHP files back to the original code, or apply that plugin's SQL changes to your database so that the database is compatible with your PHP files.
    .

    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.

  7. #7
    Join Date
    Jun 2012
    Posts
    11
    Plugin Contributions
    0

    Default Re: WARNING: An Error occurred, please refresh the page and try again - in Admin-->Co

    Admin/configuration.php right?

    Had a look at the file and it is unchanged, as uploaded on the server. Where in that file would you recommend me to look for errors?

    But now I have a suspect which plugin from the old shop could cause the error in the DB. It's VAT for European companies which I believe
    was not developed any further from 1.3 on and it adds a menu topic "VAT number" to the Admin-->Configure. Difficult to fix, IMHO.

    Since the design of the new shop needs to be updated anyway, I wouldn't mind to drop the old shop completely. As I said the main purpose of the
    exercise was to import all client, product and order details. And this is confirmed working, since they are all there in the new shop.

    Could you maybe point me to some direction which database tables I would need to copy to the fresh ZC 1.5.3 database instead?

  8. #8
    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 - in Admin-->Co

    Quote Originally Posted by hyperion12 View Post
    Admin/configuration.php right?
    ...
    Where in that file would you recommend me to look for errors?
    On line 60, exactly as the error message in your log says:
    Quote Originally Posted by hyperion12 View Post
    It says:

    Code:
    [19-Sep-2014 05:48:29] PHP Fatal error:  1054:Unknown column 'language_id' in 'where clause' :: select configuration_group_title
                                 from vqkr_configuration_group
                                 where configuration_group_id = '1' AND language_id=1 ==> (as called by) /home/domain.com/public_html/zen1/admin...../configuration.php on line 60 <== ...
    .

    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.

  9. #9
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    46
    Plugin Contributions
    0

    red flag WARNING: An Error occurred, please refresh the page and try again. PHP Fatal error

    Hi guys,
    I upgraded 156a to 157c with upgrading also Mysql from 5.6 to 5.7.29. Also PHP from 7.2 to 7.418. All seem ok but when trying to post a new product I get the message WARNING: An Error occurred, please refresh the page and try again. If you were entering information, press the BACK button in your browser and ...
    The error log shows
    [21-Jul-2021 09:27:24 UTC] Request URI: /admin/index.php?cmd=product&cPath=192&action=insert_product, IP address: xxxxxx
    #1 trigger_error() called at [/Applications/Abyss Web Server/htdocs/zencart-v157c-04072021/includes/classes/db/mysql/query_factory.php:170]
    #2 queryFactory->show_error() called at [/Applications/Abyss Web Server/htdocs/zencart-v157c-04072021/includes/classes/db/mysql/query_factory.php:142]
    #3 queryFactory->set_error() called at [/Applications/Abyss Web Server/htdocs/zencart-v157c-04072021/includes/classes/db/mysql/query_factory.php:269]
    #4 queryFactory->Execute() called at [/Applications/Abyss Web Server/htdocs/zencart-v157c-04072021/includes/functions/database.php:44]
    #5 zen_db_perform() called at [/Applications/Abyss Web Server/htdocs/zencart-v157c-04072021/admin/includes/modules/update_product.php:71]
    #6 require(/Applications/Abyss Web Server/htdocs/zencart-v157c-04072021/macadmin1/includes/modules/update_product.php) called at [/Applications/Abyss Web Server/htdocs/zencart-v157c-04072021/admin/product.php:33]
    #7 require(/Applications/Abyss Web Server/htdocs/zencart-v157c-04072021/admin/product.php) called at [/Applications/Abyss Web Server/htdocs/zencart-v157c-04072021/macadmin1/index.php:11]
    --> PHP Fatal error: 1364:Field 'products_msrp' doesn't have a default value :: INSERT INTO products (products_quantity, products_type, products_model, products_price, products_date_available, products_weight, products_status, products_virtual, products_tax_class_id, manufacturers_id, products_quantity_order_min, products_quantity_order_units, products_priced_by_attribute, product_is_free, product_is_call, products_quantity_mixed, product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max, products_sort_order, products_discount_type, products_discount_type_from, products_price_sorter, products_image, products_date_added, master_categories_id) VALUES ('0', '1', 'dfsfgdf', '84.0336', null, '0', '1', '0', '1', '1', '1', '1', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', 'productimages/pwrabyss.gif', now(), '192') ==> (as called by) /Applications/Abyss Web Server/htdocs/zencart-v157c-04072021/includes/functions/database.php on line 44 <== in /Applications/Abyss Web Server/htdocs/zencart-v157c-04072021/includes/classes/db/mysql/query_factory.php on line 170.

    I re-imported the database multiple times and setup the zencart from scratch without success. It seems there is an issue with the Default values /Null in Mysql 5.7 and I am not sure how to solve the issue. If you have any recommendations I will appreciate it.

  10. #10
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,697
    Plugin Contributions
    123

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

    You have added the field products_msrp to the products table without a default value. The easiest way to fix this is through the database. In phpMyAdmin or Admin > Tools > Install SQL Patches, you can do

    ALTER TABLE products MODIFY COLUMN products_msrp decimal(15,4) NOT NULL default '0.0000';

    (I am assuming that the current type of products.products_msrp is "decimal(15,4)" - if it's not, use your current type.)
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 
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. v154 WARNING: An Error occurred, please refresh the page and try again.
    By bscho in forum Installing on a Linux/Unix Server
    Replies: 6
    Last Post: 6 Jul 2016, 01:50 AM
  3. v150 WARNING: An Error occurred, please refresh the page and try again
    By tifischer in forum Installing on a Mac Server
    Replies: 4
    Last Post: 17 May 2016, 03:53 AM
  4. Replies: 10
    Last Post: 17 Sep 2012, 04:50 AM
  5. Replies: 1
    Last Post: 28 Aug 2012, 05:54 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