Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Create Account Issue: White Page WARNING: An Error occurred, please refresh the page

    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]

    I have had this store running many years and several upgrades. I has been running fine just just recently, as people are complaining they cannot create an account. When a user tries to create an account: http://www.yearbookbinders.com/index...create_account

    The page after hitting the submit button a Blank White page with this error:
    Code:
    WARNING: An Error occurred, please refresh the page and try again.
    In looking at the log files, I see this error right after my submission with the error:
    Code:
    [27-Jan-2020 18:21:52 UTC] Request URI: /index.php?main_page=create_account, IP address: 174.103.324.59
    #1  trigger_error() called at [/HIDDEN/public_html/includes/classes/db/mysql/query_factory.php:171]
    #2  queryFactory->show_error() called at [/HIDDEN/public_html/includes/classes/db/mysql/query_factory.php:143]
    #3  queryFactory->set_error() called at [/HIDDEN/public_html/includes/classes/db/mysql/query_factory.php:270]
    #4  queryFactory->Execute() called at [/HIDDEN/public_html/includes/classes/db/mysql/query_factory.php:423]
    #5  queryFactory->perform() called at [/HIDDEN/public_html/includes/modules/create_account.php:293]
    #6  include(/HIDDEN/public_html/includes/modules/create_account.php) called at [/HIDDEN/public_html/includes/modules/pages/create_account/header_php.php:17]
    #7  require(/HIDDEN/public_html/includes/modules/pages/create_account/header_php.php) called at [/HIDDEN/public_html/index.php:36]
    --> PHP Fatal error: 1364:Field 'customers_extrafield' doesn't have a default value :: INSERT INTO customers (customers_firstname, customers_lastname, customers_email_address, customers_nick, customers_telephone, customers_fax, customers_newsletter, customers_email_format, customers_default_address_id, customers_password, customers_authorization) VALUES ('Jack', 'Jackson', 'hidden######################', '', '5551212368', '', 1, 'HTML', 0, '$2y$10$EuA7Juv/1bB1Dn9.gPchQuSw9TkeY7hFZe9nrXI/RzMvEHvhqFYAS', 0) ==> (as called by) /HIDDEN/public_html/includes/modules/create_account.php on line 293 <== in /HIDDEN/public_html/includes/classes/db/mysql/query_factory.php on line 171.
    AT one time (Previous version 1.5.5a), I did have the plugin: Admin New Customer 1.1 installed. But I have been able to upgrade the site since, and the store was working fine. Including to v.1.5.6c for many months now without issue. So not sure if this has anything to do with it anyway. Just though I would mention.

    This store has 1795 customers so I cannot just start over.

    Running:
    Zen Store v: 1.5.6c
    PHP Version: 7.2
    MySQL Database: MariaDB

    Please advise.
    Building a better web, one site at a time: Dayton Web Design

  2. #2
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Create Account Issue: White Page WARNING: An Error occurred, please refresh the

    'customers_extrafield'
    is missing in the code or in the SQL table.

    Can't add INSERT INTO a value to the customers table if it's not there to record it.

    Add the customers_extrafield to your db if it is missing :)
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Create Account Issue: White Page WARNING: An Error occurred, please refresh the

    Quote Originally Posted by sports guy View Post
    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]

    I have had this store running many years and several upgrades. I has been running fine just just recently, as people are complaining they cannot create an account. When a user tries to create an account: http://www.yearbookbinders.com/index...create_account

    The page after hitting the submit button a Blank White page with this error:
    Code:
    WARNING: An Error occurred, please refresh the page and try again.
    In looking at the log files, I see this error right after my submission with the error:
    Code:
    [27-Jan-2020 18:21:52 UTC] Request URI: /index.php?main_page=create_account, IP address: 174.103.324.59
    #1  trigger_error() called at [/HIDDEN/public_html/includes/classes/db/mysql/query_factory.php:171]
    #2  queryFactory->show_error() called at [/HIDDEN/public_html/includes/classes/db/mysql/query_factory.php:143]
    #3  queryFactory->set_error() called at [/HIDDEN/public_html/includes/classes/db/mysql/query_factory.php:270]
    #4  queryFactory->Execute() called at [/HIDDEN/public_html/includes/classes/db/mysql/query_factory.php:423]
    #5  queryFactory->perform() called at [/HIDDEN/public_html/includes/modules/create_account.php:293]
    #6  include(/HIDDEN/public_html/includes/modules/create_account.php) called at [/HIDDEN/public_html/includes/modules/pages/create_account/header_php.php:17]
    #7  require(/HIDDEN/public_html/includes/modules/pages/create_account/header_php.php) called at [/HIDDEN/public_html/index.php:36]
    --> PHP Fatal error: 1364:Field 'customers_extrafield' doesn't have a default value :: INSERT INTO customers (customers_firstname, customers_lastname, customers_email_address, customers_nick, customers_telephone, customers_fax, customers_newsletter, customers_email_format, customers_default_address_id, customers_password, customers_authorization) VALUES ('Jack', 'Jackson', 'hidden######################', '', '5551212368', '', 1, 'HTML', 0, '$2y$10$EuA7Juv/1bB1Dn9.gPchQuSw9TkeY7hFZe9nrXI/RzMvEHvhqFYAS', 0) ==> (as called by) /HIDDEN/public_html/includes/modules/create_account.php on line 293 <== in /HIDDEN/public_html/includes/classes/db/mysql/query_factory.php on line 171.
    AT one time (Previous version 1.5.5a), I did have the plugin: Admin New Customer 1.1 installed. But I have been able to upgrade the site since, and the store was working fine. Including to v.1.5.6c for many months now without issue. So not sure if this has anything to do with it anyway. Just though I would mention.

    This store has 1795 customers so I cannot just start over.

    Running:
    Zen Store v: 1.5.6c
    PHP Version: 7.2
    MySQL Database: MariaDB

    Please advise.
    I'm 'assuming' that 'customers_extrafield' is a character field, copy/paste the following into either your admin's Tools->Install SQL Patches or into the 'SQL' tab of your webhost's phpMyAdmin. That (er) sets the default for the field to an empty string.
    Code:
    ALTER TABLE customers ALTER customers_extrafield SET DEFAULT '';

  4. #4
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Create Account Issue: White Page WARNING: An Error occurred, please refresh the

    Quote Originally Posted by lat9 View Post
    I'm 'assuming' that 'customers_extrafield' is a character field, copy/paste the following into either your admin's Tools->Install SQL Patches or into the 'SQL' tab of your webhost's phpMyAdmin. That (er) sets the default for the field to an empty string.
    Code:
    ALTER TABLE customers ALTER customers_extrafield SET DEFAULT '';

    I added this querry to the Admin Install SQL Patches, but the error page still show. The same errors show in the error log after my last attempt.
    Building a better web, one site at a time: Dayton Web Design

  5. #5
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Create Account Issue: White Page WARNING: An Error occurred, please refresh the

    In looking through my previous module installations, I did at one time have this installed (zen cart v1.5.5a): "Extra Field On Customer Sign-up v 2.0". I noticed that old module has this in the module install.sql:

    Code:
    ALTER TABLE customers ADD customers_extrafield varchar(32) NOT NULL AFTER customers_fax;
    
    
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display Extra Field #1', 'DISPLAY_EXTRAFIELD', 'true', 'Display Extra Field #1 on Sign Up page and My Account page', '5', '6', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Require Extra Field #1', 'EXTRAFIELD_REQUIRED', 'true', 'Require Extra Field #1 on Sign Up page and My Account page', '5', '7', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    
    
    
    
    ALTER TABLE customers ADD customers_extrafield2 varchar(32) NOT NULL AFTER customers_extrafield;
    
    
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display Extra Field #2', 'DISPLAY_EXTRAFIELD2', 'true', 'Display Extra Field #2 on Sign Up page and My Account page', '5', '6', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Require Extra Field #2', 'EXTRAFIELD_REQUIRED2', 'true', 'Require Extra Field #2 on Sign Up page and My Account page', '5', '7', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    
    
    
    
    ALTER TABLE customers ADD customers_extrafield3 varchar(32) NOT NULL AFTER customers_extrafield2;
    
    
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display Extra Field #3', 'DISPLAY_EXTRAFIELD3', 'true', 'Display Extra Field #3 on Sign Up page and My Account page', '5', '6', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Require Extra Field #3', 'EXTRAFIELD_REQUIRED3', 'true', 'Require Extra Field #3 on Sign Up page and My Account page', '5', '7', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    
    
    
    
    
    ALTER TABLE customers ADD customers_extrafield4 TEXT NOT NULL AFTER customers_extrafield3;
    
    
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display Extra Field #4', 'DISPLAY_EXTRAFIELD4', 'true', 'Display Extra Field #4 on Sign Up page and My Account page', '5', '6', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Require Extra Field #4', 'EXTRAFIELD_REQUIRED4', 'false', 'Require Extra Field #4 on Sign Up page and My Account page', '5', '7', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    
    
    
    
    ALTER TABLE customers ADD customers_extrafield5 varchar(32) NOT NULL AFTER customers_extrafield4;
    
    
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display Extra Field #5', 'DISPLAY_EXTRAFIELD5', 'true', 'Display Extra Field #5 on Sign Up page and My Account page', '5', '6', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Require Extra Field #5', 'EXTRAFIELD_REQUIRED5', 'true', 'Require Extra Field #5 on Sign Up page and My Account page', '5', '7', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    I was using this to get 3 custom fields during signup in the past, that I no longer use. But this has been gone since last version of Zen Cart and no issues till now. So not sure if its related, but might still have this in my database. Also, I don't ever remember removing this module manually or upgrading.
    Building a better web, one site at a time: Dayton Web Design

  6. #6
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,684
    Plugin Contributions
    9

    Default Re: Create Account Issue: White Page WARNING: An Error occurred, please refresh the

    Quote Originally Posted by sports guy View Post
    I added this querry to the Admin Install SQL Patches, but the error page still show. The same errors show in the error log after my last attempt.
    unfortunately, i'm not buying it. @lat9's solution would have addressed the specific error you were having. there might be another error with another field not having a default value.

    this error is because mariaDB's default is strict mode. you can turn strict mode off.

    in the same sql patch editor you can try running:

    Code:
    SET GLOBAL sql_mode = 'NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
    sql statements are dangerous. ensure you have backups.

    good luck.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #7
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Create Account Issue: White Page WARNING: An Error occurred, please refresh the

    Then you'll need to remove the reference to customers_extrafield in the SQL and in the code where you are not using it - so it's not calling it.

    Site search for customers_extrafield one at a time remove and properly rewrite the syntax of the code and drop the SQL field and it will be uninstalled :)
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  8. #8
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Create Account Issue: White Page WARNING: An Error occurred, please refresh the

    I was able to remove all the site files from the Plugin: Extra Field On Customer Sign Up. This plugin was obviously the issue, as they were the database files showing in the error log. Besides, no longer using.
    Next, I did a search in Developers Toolkit for: customers_extrafield. No results came up, so I know my files were removed properly. My only issue now is how to remove the installed fields in my database. I then went to PHPmyAdmin and searched for: customers_extrafield and there were 8 instances. I dropped all those 8 tables (that were installed via SQL patch via the plugin file I pasted earlier). Did another search in PHP My Admin all instances are now gone.

    I still get a blank page with the same error.

    This is my new error log:
    Code:
    [28-Jan-2020 16:55:04 UTC] Request URI: /access42/sqlpatch.php?action=execute, IP address: 174.103.324.59
    #1  trigger_error() called at [/HIDDEN/public_html/includes/classes/db/mysql/query_factory.php:171]
    #2  queryFactory->show_error() called at [/HIDDEN/public_html/includes/classes/db/mysql/query_factory.php:143]
    #3  queryFactory->set_error() called at [/HIDDEN/public_html/includes/classes/db/mysql/query_factory.php:270]
    #4  queryFactory->Execute() called at [/HIDDEN/public_html/access42/sqlpatch.php:295]
    #5  executeSql() called at [/HIDDEN/public_html/access42/sqlpatch.php:739]
    --> PHP Fatal error: 1227:Access denied; you need (at least one of) the SUPER privilege(s) for this operation :: SET GLOBAL sql_mode = 'NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; ==> (as called by) /HIDDEN/public_html/access42/sqlpatch.php on line 295 <== in /HIDDEN/public_html/includes/classes/db/mysql/query_factory.php on line 171.
    Building a better web, one site at a time: Dayton Web Design

  9. #9
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Create Account Issue: White Page WARNING: An Error occurred, please refresh the

    I also found stray tables: DISPLAY_EXTRAFIELD and EXTRAFIELD_REQUIRED that are both also related to the install.sql file and this plugin as well. Just removed these (10 items) and the issue persists.
    Building a better web, one site at a time: Dayton Web Design

  10. #10
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Create Account Issue: White Page WARNING: An Error occurred, please refresh the

    At this point if I had my hands on the code I'd be comparing a stock ZC create_account.php with what you have to narrow down what works with what doesn't.

    You may want to check the installer hasn't also modified additional core files or chopped nay missed syntax where the offending field was.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 31
    Last Post: 25 Dec 2018, 11:05 PM
  2. v155 WARNING: An Error occurred, please refresh the page and try again.
    By KGL Racing in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Nov 2018, 05:20 PM
  3. Replies: 2
    Last Post: 6 Sep 2016, 05:56 PM
  4. v155 Warning: an error occurred. please refresh the page
    By wmorris in forum General Questions
    Replies: 10
    Last Post: 12 Apr 2016, 03:32 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