Unable to delete users after upgrading to 7.0.2

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Unable to delete users after upgrading to 7.0.2

Post by Brewhaus » Sat Apr 18, 2009 9:17 pm

Since completing our upgrade to 7.0.2 we have been unable to delete users via the Admin menu. When trying, we get a popup window saying giving a 500 error. Has anyone else had this issue, and how can we resolve it?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Unable to delete users after upgrading to 7.0.2

Post by AbleMods » Sun Apr 19, 2009 12:27 pm

I've got my dev install of Solunar.com running on 7.0.2 - no problems deleting users at all.

Have you tried deleting the same user manually from SQL manager? Perhaps it's SQL throwing an error....
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Unable to delete users after upgrading to 7.0.2

Post by Brewhaus » Sun Apr 19, 2009 12:49 pm

You were on the right track, Joe. I went directly into the SQL table and was unable to delete the user even when working with the table itself. The error was:

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid Object Name 'ac_Orders'.

Now, prior to the upgrade it was not a problem to delete customers from the Admin menu or the table (we had done both).

So I took a look at the permissions on the tables, and three tables have an incorrect owner associated with them (the main user name from the file instead of dbo). How do I correct this?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Unable to delete users after upgrading to 7.0.2

Post by AbleMods » Sun Apr 19, 2009 2:13 pm

Hmmm an invalid object error when deleting a table record suggests a referential integrity check that fails. Sounds like ac_Users has somehow gotten linked to ac_Orders inside SQL.

Check the referential integrity setup on ac_Users. It should not be set to cascade deletes/updates into ac_Orders. Otherwise, deleting a user would also delete that users orders which would be bad.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Unable to delete users after upgrading to 7.0.2

Post by AbleMods » Sun Apr 19, 2009 2:14 pm

Brewhaus wrote:So I took a look at the permissions on the tables, and three tables have an incorrect owner associated with them (the main user name from the file instead of dbo). How do I correct this?
You talking about the schema i.e. [dbo].ac_Users instead of [someuser].ac_Users?
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Unable to delete users after upgrading to 7.0.2

Post by Brewhaus » Sun Apr 19, 2009 3:03 pm

When you pull the list of tables, the column 'Owner' has dbo listed for all but three of the tables. For those three tables a different owner is listed. I know that this can be changed, but do not recall how.

Something must have happened when we restored a backup after a problem upgrading a week ago, as everything was working fine prior to that.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Unable to delete users after upgrading to 7.0.2

Post by AbleMods » Sun Apr 19, 2009 9:38 pm

So you're thinking at this point is that permissions are wrong? You can edit records and save new records, but you cannot delete?

That would be a very specific permissions issue, but I guess it's possible.

Check out these SQL commands, perhaps they'll help: http://www.mssqltips.com/tip.asp?tip=1396
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: Unable to delete users after upgrading to 7.0.2

Post by Brewhaus » Mon Apr 20, 2009 6:51 am

Ar you familiar enough with SQL to know where we perform this?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Unable to delete users after upgrading to 7.0.2

Post by AbleMods » Mon Apr 20, 2009 7:53 am

Yeah but not through forum posts. It's something I'd have to look at and see first-hand...

PM'd you my contact info.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply