History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: OSC-107
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Harald Ponce de Leon
Reporter: Dale Jordan
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
osCommerce Core

Unable to create an account during checkout

Created: 10/Feb/07 03:43 AM   Updated: 05/Mar/07 06:08 AM
Return to search
Component/s: Database
Affects Version/s: 3.0 Alpha 3
Fix Version/s: 3.0 Alpha 4

Environment: Windows XP + Apache 2.2


 Description  « Hide
I tried to do a "purchase" with the sample database; when I went through the account creation process during checkout the response indicated the account creation was successful, but nothing went into the database. I tracked this down to a problems with the osc_customers table: the fields customers_default_address_id and customers_telephone were not filled in on the creation form, had no default values and were labeled "NOT NULL" , so MySQL failed the INSERT, which was not detected.

I fixed the problem by adding a default value of 0 for the address_id and removing the "NOT NULL" from the telephone field. I don't know if this is the desirable fix, but it worked to get checkout going.

To find this I added the following to Osc_Database::setError and turned on query logging; I think this might be helpful in general, even though this particular error won't occur with proper table definition.

{code}
        if (!osc_empty(SERVICE_DEBUG_EXECUTION_TIME_LOG) && (SERVICE_DEBUG_LOG_DB_QUERIES == '1')) {
           @error_log('QUERY-ERROR ' . $this->getError() . "\n", 3, SERVICE_DEBUG_EXECUTION_TIME_LOG);
        }
{endcode}

 All   Comments   Change History      Sort Order:
Change by Frank Heinen [10/Feb/07 11:39 AM]
Field Original Value New Value
Assignee Harald Ponce de Leon [ hpdl ] Frank Heinen [ f.r.@.n.k ]

Harald Ponce de Leon [05/Mar/07 06:08 AM]
Fixed in r1316. Thanks for the report.

Change by Harald Ponce de Leon [05/Mar/07 06:08 AM]
Field Original Value New Value
Status Open [ 1 ] Closed [ 6 ]
Fix Version/s 3.0 Alpha 4 [ 10002 ]
Resolution Fixed [ 1 ]
Assignee Frank Heinen [ f.r.@.n.k ] Harald Ponce de Leon [ hpdl ]