Invalid column names while upgrading

Max De Los Reyes asked on November 18, 2022 00:09

I am following the Upgrade guide to Kentico 11 and on the post-upgrade section regarding macros and ensuring their functionality.

I am attempting to run the search with "Report problems" checked and am receiving errors that are linked to columns that I believe have been dropped with K11.

Example: Error[DataConnection.HandleError]: Query: SELECT TOP 300 * FROM COM_Order WHERE ([OrderNote] LIKE @OrderNote OR [OrderInvoice] LIKE @OrderInvoice OR [OrderInvoiceNumber] LIKE @OrderInvoiceNumber OR [OrderTrackingNumber] LIKE @OrderTrackingNumber OR [OrderCustomData] LIKE @OrderCustomData OR [OrderPaymentResult] LIKE @OrderPaymentResult OR [OrderCulture] LIKE @OrderCulture OR [OrderCouponCode] LIKE @OrderCouponCode OR [OrderShippingTaxes] LIKE @OrderShippingTaxes OR [OrderDiscounts] LIKE @OrderDiscounts) Caused exception: Invalid column name 'OrderCouponCode'. Invalid column name 'OrderShippingTaxes'.

I started temporarily bypassing these errors by re-adding the columns to the corresponding tables, but they kept coming, and I don't want that to cascade and cause problems elsewhere on the site.

I'm assuming that some stored procedures are outdated, but there's a heap of them to sort through. Can anyone point me in the right direction? How can I fix this correctly?

Correct Answer

Juraj Ondrus answered on November 20, 2022 07:33

Those columns were removed in Kentico 11(screen shot) so the upgrade procedure removed them too. It looks like something was not upgraded right and I would maybe restore the backups and upgrade again. Also, due to these changes, there could be some issues when working with orders created before the upgrade.
But still, the SQL query should be using the new column names - I think the upgrade did not completed all OK. Was the admin app launched after the upgrade as described here? Did you get the entries in the Event log?

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.