logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
pdsteiner8198692  
#1 Posted : Thursday, November 10, 2022 1:48:58 PM(UTC)
pdsteiner8198692

Rank: Member

Groups: Authorized User, HelpDesk
Joined: 12/30/2020(UTC)
Posts: 13

According to the help and support page (http://help.ablecommerce.com/index.htm#t=upgrades%2FAC9_CMS%2FUpgrade_to_AbleCommerce_9.htm) our store version (7.0.7) could be upgraded directly to the latest version, but it fails. Am I missing something?

Upgrade AbleCommerce Database
The errors listed below occurred while upgrading the database:

SQL: -- ENFORCE UNIQUE ORDER NUMBERS IF (SELECT COUNT(*) AS NumRows FROM sysindexes WHERE id = (SELECT OBJECT_ID('ac_Orders')) AND Name = 'ac_Orders_IXOrderNumber') = 0 BEGIN CREATE UNIQUE INDEX ac_Orders_IXOrderNumber ON ac_Orders (OrderNumber) END
Error: Cannot find the object "ac_Orders" because it does not exist or you do not have permissions.
SQL: if (SELECT COUNT(*) AS NumRows FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ac_Orders' AND COLUMN_NAME = 'IsSubscriptionGenerated') = 0 BEGIN ALTER TABLE ac_Orders ADD IsSubscriptionGenerated BIT DEFAULT 0 NOT NULL END
Error: Cannot find the object "ac_Orders" because it does not exist or you do not have permissions.
SQL: IF (SELECT COUNT(*) AS NumRows FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ac_SubscriptionOrders') = 0 BEGIN CREATE TABLE [ac_SubscriptionOrders] ([SubscriptionOrderId] [int] IDENTITY(1,1) NOT NULL, [SubscriptionId] [int] NOT NULL, [OrderId] [int] NOT NULL, [IsPrimary] [BIT] DEFAULT 0 NOT NULL, [OrderDueDate] [DATETIME] NOT NULL, [PaymentAlertDate] [DATETIME] NULL, PRIMARY KEY(SubscriptionOrderId)) END -- check for foreignkey relationships if (SELECT COUNT(*) AS NumRows FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME = 'ac_SubscriptionOrders' AND CONSTRAINT_NAME = 'FK_ac_SubscriptionOrders_ac_Subscriptions') = 0 BEGIN ALTER TABLE ac_SubscriptionOrders ADD CONSTRAINT FK_ac_SubscriptionOrders_ac_Subscriptions FOREIGN KEY (SubscriptionId) REFERENCES ac_Subscriptions (SubscriptionId) ON UPDATE NO ACTION ON DELETE CASCADE END if (SELECT COUNT(*) AS NumRows FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME = 'ac_SubscriptionOrders' AND CONSTRAINT_NAME = 'FK_ac_SubscriptionOrders_ac_Orders') = 0 BEGIN ALTER TABLE ac_SubscriptionOrders ADD CONSTRAINT FK_ac_SubscriptionOrders_ac_Orders FOREIGN KEY (OrderId) REFERENCES ac_Orders (OrderId) ON UPDATE NO ACTION ON DELETE CASCADE END IF (SELECT COUNT(*) AS NumRows FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ac_GatewayPaymentProfiles') = 0 BEGIN CREATE TABLE [ac_GatewayPaymentProfiles] ([GatewayPaymentProfileId] [int] IDENTITY(1,1) NOT NULL, [UserId] [int] NOT NULL, [NameOnCard] [nvarchar](255) NULL, [GatewayIdentifier] [nvarchar](255) NULL, [CustomerProfileId] [nvarchar](255) NULL, [PaymentProfileId] [nvarchar](255) NULL, [ReferenceNumber] [nvarchar](255) NULL, [InstrumentTypeId] [SMALLINT] NOT NULL DEFAULT 0, [Expiry] [DATETIME] NULL, PRIMARY KEY(GatewayPaymentProfileId)) END -- check for foreignkey relationships if (SELECT COUNT(*) AS NumRows FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME = 'ac_GatewayPaymentProfiles' AND CONSTRAINT_NAME = 'FK_ac_GatewayPaymentProfiles_ac_Users') = 0 BEGIN ALTER TABLE ac_GatewayPaymentProfiles ADD CONSTRAINT FK_ac_GatewayPaymentProfiles_ac_Users FOREIGN KEY (UserId) REFERENCES ac_Users (UserId) ON UPDATE NO ACTION ON DELETE CASCADE END if (SELECT COUNT(*) AS NumRows FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME = 'ac_Subscriptions' AND CONSTRAINT_NAME = 'ac_PaymentMethods_ac_Subscriptions_FK1') = 0 BEGIN ALTER TABLE ac_Subscriptions ADD CONSTRAINT ac_PaymentMethods_ac_Subscriptions_FK1 FOREIGN KEY (PaymentMethodId) REFERENCES ac_PaymentMethods (PaymentMethodId) ON UPDATE NO ACTION ON DELETE SET NULL END if (SELECT COUNT(*) AS NumRows FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME = 'ac_Subscriptions' AND CONSTRAINT_NAME = 'ac_GatewayPaymentProfiles_ac_Subscriptions_FK1') = 0 BEGIN ALTER TABLE ac_Subscriptions ADD CONSTRAINT ac_GatewayPaymentProfiles_ac_Subscriptions_FK1 FOREIGN KEY (GatewayPaymentProfileId) REFERENCES ac_GatewayPaymentProfiles (GatewayPaymentProfileId) ON UPDATE NO ACTION ON DELETE NO ACTION END if (SELECT COUNT(*) AS NumRows FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME = 'ac_Subscriptions' AND CONSTRAINT_NAME = 'ac_TaxCodes_ac_Subscriptions_FK1') = 0 BEGIN ALTER TABLE ac_Subscriptions ADD CONSTRAINT ac_TaxCodes_ac_Subscriptions_FK1 FOREIGN KEY (BaseTaxCodeId) REFERENCES ac_TaxCodes (TaxCodeId) ON UPDATE NO ACTION ON DELETE SET NULL END if (SELECT COUNT(*) AS NumRows FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME = 'ac_Subscriptions' AND CONSTRAINT_NAME = 'ac_TaxCodes_ac_Subscriptions_FK2') = 0 BEGIN ALTER TABLE ac_Subscriptions ADD CONSTRAINT ac_TaxCodes_ac_Subscriptions_FK2 FOREIGN KEY (RecurringTaxCodeId) REFERENCES ac_TaxCodes (TaxCodeId) ON UPDATE NO ACTION ON DELETE NO ACTION END -- add new email templates if (SELECT COUNT(*) FROM ac_EmailTemplates WHERE Name = 'Subscription Payment Reminder' AND StoreId = 1) = 0 BEGIN DECLARE @templateId int INSERT INTO [ac_EmailTemplates] ([StoreId], [Name], [ToAddress], [FromAddress], [ReplyToAddress], [CCList], [BCCList], [Subject], [ContentFileName], [IsHTML]) VALUES ( 1, 'Subscription Payment Reminder', 'customer', 'merchant', NULL, NULL, NULL, 'Subscription Pending Payment Reminder', 'Subscription Payment Reminder.html', 1 ); SET @templateId = Scope_Identity() if (@templateId > 0) BEGIN if (SELECT COUNT(*) FROM ac_StoreSettings WHERE FieldName = 'ROPaymentReminderEmailTemplateId' AND StoreId = 1) > 0 BEGIN UPDATE [ac_StoreSettings] SET [FieldValue] = @templateId WHERE [FieldName] = 'ROPaymentReminderEmailTemplateId' END else BEGIN INSERT INTO [ac_StoreSettings] ([StoreId], [FieldName], [FieldValue]) VALUES ( 1, 'ROPaymentReminderEmailTemplateId', @templateId) END END END
Error: Foreign key 'FK_ac_SubscriptionOrders_ac_Orders' references invalid table 'ac_Orders'. Could not create constraint or index. See previous errors.
SQL: DECLARE @sql nvarchar(max); SET @sql = ''; SELECT @sql = @sql + 'IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N''[' + tab.[name] + ']'') AND name = N''IX_' + cols.[name] + ''') ' + 'CREATE NONCLUSTERED INDEX [IX_' + cols.[name] + '] ON [' + tab.[name] + ']( [' + cols.[name] + '] ASC ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY];' FROM sys.foreign_keys keys INNER JOIN sys.foreign_key_columns keyCols ON keys.object_id = keyCols.constraint_object_id INNER JOIN sys.columns cols ON keyCols.parent_object_id = cols.object_id AND keyCols.parent_column_id = cols.column_id INNER JOIN sys.tables tab ON keyCols.parent_object_id = tab.object_id WHERE tab.[name] LIKE 'ac_%' AND tab.[name] + '.' + cols.[name] NOT IN ('ac_PageViews.StoreId', 'ac_Orders.StoreId', 'ac_Orders.UserId', 'ac_OrderItems.OrderId', 'ac_OrderNotes.OrderId', 'ac_OrderShipments.OrderId', 'ac_Payments.OrderId', 'ac_Products.StoreId', 'ac_Products.ManufacturerId') ORDER BY tab.[name], cols.[name] exec sp_executesql @sql
Error: Cannot find the object "ac_CustomUrls" because it does not exist or you do not have permissions.

Edited by user Friday, November 11, 2022 10:31:29 AM(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

charles25686713  
#2 Posted : Thursday, November 10, 2022 5:52:46 PM(UTC)
charles25686713

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 7/1/2022(UTC)
Posts: 71

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Hi, please define the steps you take to try the upgrade.
judy at Web2Market  
#3 Posted : Friday, November 11, 2022 5:01:17 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
Make sure the schema owner for your tables is dbo. I ran into that issue on a couple of sites where they were controlled by Plesk control panel.
pdsteiner8198692  
#4 Posted : Friday, November 11, 2022 9:02:34 AM(UTC)
pdsteiner8198692

Rank: Member

Groups: Authorized User, HelpDesk
Joined: 12/30/2020(UTC)
Posts: 13

According to Mike:

"Need to fix the prefix on those first tables, needs to be dbo.

Run this script on the db…change ‘snoopy’ in two places to the prefix you find.

SELECT 'EXEC sp_changeobjectowner ''Snoopy.' + name + ''', ''dbo'''
FROM sys.tables
WHERE schema_id = SCHEMA_ID('Snoopy');

Then copy the results of this query and re-run that it as a new query to change everything back to dbo."

I did, then got the error below:

Changed database context to 'ac907db'.

EXEC sp_changeobjectowner 'ac707net40db.ac_CustomUrls', 'dbo'
Msg 15151, Level 16, State 1, Line number 1
Cannot transfer the object 'ac_CustomUrls', because it does not exist or you do not have permission.

Our hosting provider is GoDaddy on a Windows account with Plesk.

Edited by user Friday, November 11, 2022 9:04:40 AM(UTC)  | Reason: Not specified

pdsteiner8198692  
#5 Posted : Friday, November 11, 2022 9:56:34 AM(UTC)
pdsteiner8198692

Rank: Member

Groups: Authorized User, HelpDesk
Joined: 12/30/2020(UTC)
Posts: 13

I managed to change the schema. Upgrading is working fine, with minor things to fix.
ray22901031  
#6 Posted : Friday, November 11, 2022 9:58:14 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
Is there any way you can do this on a local server and skip any remote conversion?

I know this could incur additional costs, but it certainly saves on time and mental frustration. Besides our local servers, we always maintain a FULL server on liquid web that can be accessed by myself and our developers.

Moving from an older version to the current one does not seem to be an easy feat, even when I "remote" using Windows, without any other third-party software, from server to server, there's always some sort of limitation because of the remote protocol.

Just looking at your error log makes me want to crawl back into bed. I hope you resolve your issue, but in our case, I would never do this remotely.

Just my thoughts,
-Ray

pdsteiner8198692  
#7 Posted : Friday, November 11, 2022 11:54:23 AM(UTC)
pdsteiner8198692

Rank: Member

Groups: Authorized User, HelpDesk
Joined: 12/30/2020(UTC)
Posts: 13

Hi, Ray.

No, I'd like to do it on the hosting server, because I've been there with phrases like "works on my computer, don't know why isn't working in the production", better do it on the "real" thing. Right now, I'm dealing with the "dynamic compilation" issue, GoDaddy blocks it, probably it needs to be precompiled.
ray22901031  
#8 Posted : Friday, November 11, 2022 12:27:12 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
I can definitely understand the "works on my computer" phrase. I'm happy that you're making progress.

You are obviously using a shared server, we refuse not to do so. We will pay a bit extra for dedicated servers, and make sure that I have 100% control over both servers. These third parties on shared servers environments for us, creates too many problems. Using Windows remote connection is best for us.

We just moved from 9.05 to 9.07, skipping version 9.0.6, and all I can say is never again. I will never skip another version. Too many files were introduced in 9.0.6, nowhere to be found when we did the conversion.

I cannot even imagine what you're going through from a version 7 to a version 9.

Since I control everything on the server, I also control all rights to the main directories and subdirectories, and because of this, I never have a issue with "it works on my computer".

Not only do we have the liquid web server up and running, but I also have in my home a full-blown window server with the SQL Server running in the same box, obviously for backup and testing purposes.

However, one of the things about, "works on my computer" it's the ability to see the rights, between server boxes and make corrections. Obviously, you know that if it works in your computer, you know there has to be something amidst at the remote box.

Just for the record, it is so cheap nowadays to get and HP compact server up and running.

Bottom line, welcome to version 9, I have found version 9.0.5, to be steady as a rock, going live on 9.0.7 early next month.

One last thing about being able to have full access to the server, after applying the database schema changes, in the event of a major bug in 9.0.7, it is so easy for me to just stop IIS and repoint back to 9.0.5. On our servers, we can actually go back to 9.0.3 with no problems whatsoever.

This is how we planned it, in the event of a major disaster even on a production server we can always go back to something that was working, once the database schema of course it's up to par.

Best of luck and I look forward to you posting, everything is working.

-Ray
pdsteiner8198692  
#9 Posted : Friday, November 11, 2022 12:44:18 PM(UTC)
pdsteiner8198692

Rank: Member

Groups: Authorized User, HelpDesk
Joined: 12/30/2020(UTC)
Posts: 13

Hey, Ray, my hat off to you. Very well explained and right to the point and I can definitely "see" that's the way we should moving forward in the long run. Dedicated server is the way to go, no question about it, since we also run REST APIs on the server as well. May I ask you which company to go for dedicated servers in terms of price and support.

Warm regards.
ray22901031  
#10 Posted : Friday, November 11, 2022 4:44:01 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
We use Web2Market for my hosting service, it is worth noting that only a few AbleCommerce hosting providers will ever give you full access to their dedicated servers. So, you may need to put up a little bit of a fight.

The reason is quite simple, they don't want the user who's might be unexperienced mess things up, and then they have to spend their tech support in trying to fix things, so you'll need to explain to them that you're not going to mess anything up, and you'll take full responsibilities if you do.

I have been with them now for over a year, and it has been absolutely fantastic, any issue it's usually the result of somebody else outside their servers, and I come to that conclusion quickly because I can go into the servers and check around.

Only once did they have to reset the app pool, and ever since then, if the situation needs to arrive I can reset it myself.

I run my own backup software, I have access to the firewall, although I don't use it, they will configure their stuff on the watchguard appliance. I can reset services, make my own ODBC connections and restart services as needed.

Furthermore, I also have Google Drive set up on both servers, so no more frigging FTP crap. As a full fledge vampire, I do all my work at night and make sure everything is working before I transfer to a new version, but still maintain the option to transfer back without getting them involved.

Some other things about this company, it's a company, not a one-man show. They have support tickets options that they use, should respond within 20 minutes if you're unable to resolve the problem yourself.

Judy, an active user on this forum, is one of their developers and whenever I have an issue she steps in to verify. A few weeks ago I had a issue with a module that was programmed by someone else, and due to bad coding, it messed up my order page. She was able to verify, I was able to then confirmed what the issue was and got the site up and running again.

Yes, I could host it on liquid web since it's both a development and production server. Development takes place under a directory right off the C drive called WebSites, and production, if I wanted to, is in the standard InetPub directory.

Since you're open to suggestions, the business addition of Cloudflare has been a valuable tool in reducing problems for us. As I mentioned before, with a few simple steps I can go back to a previous stable version, but soon we will have the ability to switch servers on demand with no propagation whatsoever.

All this accomplishes one thing, when I do go to bed, I can sleep very well because of the systems in place, I can determine what the issue is rather quickly, and from an owner, developer, web designer, SEO junkie point of view, that is an ultimate gift.

I hope soon of this helps.

Hopefully, the next post will be you got version 9 running and everything is working.

-Ray

Edited by user Friday, November 11, 2022 5:12:14 PM(UTC)  | Reason: Not specified

pdsteiner8198692  
#11 Posted : Monday, November 14, 2022 8:44:37 AM(UTC)
pdsteiner8198692

Rank: Member

Groups: Authorized User, HelpDesk
Joined: 12/30/2020(UTC)
Posts: 13

I have the error bellow which is probably caused by the dynamic compilation being blocked by GoDaddy in a Windows shared account. Is there a way to go around or a dedicated server is indeed needed?

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1056: Unexpected character '$'

Source Error:


Line 76: @foreach (var image in Model.AdditionalImages)
Line 77: {
Line 78: imgAttributes["id"] = $"miImage{image.Id}";
Line 79: imgAttributes["alt"] = image.ImageAltText;
Line 80: imgAttributes["title"] = image.Moniker;

Source File: g:\PleskVhosts\xyz.com\httpdocs\testingstore\Views\Product\_ProductImage.cshtml Line: 78

Edited by user Monday, November 14, 2022 8:47:03 AM(UTC)  | Reason: Not specified

ray22901031  
#12 Posted : Monday, November 14, 2022 10:19:39 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
Please, before moving to a dedicated server, I would highly suggest that all of this be done on a personal local server before investing any money. You could always compile on a local machine, get everything running on a local machine, and then transfer it to a share environment.

I would like to point out that many people are running this software on a share environment, it's just not for us. Too many problems with a share environment for us.

-Ray
Users browsing this topic
Guest (11)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.