Developer forum

Forum » CMS - Standard features » Update script (magic pixel) problems

Update script (magic pixel) problems

Peter Leleulya
Reply

I updated a project from 8.4.0.18 to 8.6.1.12 and ran the update scripts, but my Ecommerce section of the CMS doesn't work anymore due to System.IndexOutOfRangeException: OrderCustomerTitle.
A bunch of fields are missing from the database.
I'm not a big fan of manually comparing tables and adding fields.
Is there something I can do to fix this problem?
 


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Peter,

You should rerun the update script from a lower package number, and make sure that the /Admin version matches with the application version. You can rerun the update script in Management Center -> System -> System Information. Use updates.xml.aspx: 600 and ecom.xml.aspx: 200.

- Jeppe

 
Peter Leleulya
Reply

That is wat I did ...
I reran updatescripts via magic pixel from values 10, which should be the same as editing the xml file values to 10, right?

To be specific, my steps:

  1. In IIS attach 8.6.1.12 Admin to the project
  2. Copy 8.6.1.12 bin content and overwrite the application bin content with it
  3. Recycle the appool
  4. Open the admin and confirm 8.6.1.12 mentioned on the login page
  5. Run the update scripts from value 10 and wait for it to return to their values
  6. Check Global settings of which the node <LastSeenVersion><Version> has been changed to 8.6.1.12

Did I miss any steps in your opinion?

Both front-end and backend complain about missing fields, which are not in the databse. I checked.

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Can you check the Update log to see if there are packages that fail during execution? You can find the log just above the boxes where you enter the package numbers.

- Jeppe

 
Peter Leleulya
Reply

So many errors ...
A lot of already exists errors, does not exist errors, must be unique errors, etc.
Can you make anything of the attachment?

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
This post has been marked as an answer

It seems that some of the related package already has been executed, but not all of it. Try executing the following SQL statements where you remove the columns that already exist in the database. This should bring it back in line with the code.

ALTER TABLE [EcomOrders] ADD 
	[OrderCustomerTitle] NVARCHAR(255) NULL,
	[OrderCustomerFirstName] NVARCHAR(255) NULL,
	[OrderCustomerMiddleName] NVARCHAR(255) NULL,
	[OrderCustomerHouseNumber] NVARCHAR(255) NULL,
	[OrderDeliveryTitle] NVARCHAR(255) NULL,
	[OrderDeliveryFirstName] NVARCHAR(255) NULL,
	[OrderDeliveryMiddleName] NVARCHAR(255) NULL,
	[OrderDeliveryHouseNumber] NVARCHAR(255) NULL 

and

ALTER TABLE [AccessUser] ADD 
	[AccessUserTitle] NVARCHAR(255) NULL, 
	[AccessUserFirstName] NVARCHAR(255) NULL, 
	[AccessUserHouseNumber] NVARCHAR(255) NULL

- Jeppe

Votes for this answer: 1
 
Peter Leleulya
Reply

Had to remove some lines, but it seems to have done the job.

Thnx!

 

You must be logged in to post in the forum