Hello,
I am hoping you can help or point me into the right direction. We recently upgraded out DNN framework from v5.5.1 to V7.3.4. After the upgrade was complete, we noticed our Tab menu reordering was rearranged. We traced it down to the stored procedure of "DeleteTab".
In V5.5.1 we have the following code in proc "DeleteTab"
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
ALTER procedure [dbo].[DeleteTab]
@TabId int
as
delete from dbo.Tabs
where TabId = @TabId
In V7.3.4, we have the following code in proc "DeleteTab". We have traced it down to the update statement causing the reordering of our menu incorrectly.
My question is can you please help me understand why this code was introduced and/or if there is a fix for this?
If there is a fix, how do I update this stored procedure? Any information you can point me to or provide would be greatly appreciated.
/****** Object: StoredProcedure [dbo].[DeleteTab] Script Date: 05/15/2020 15:00:37 ******/
ALTER PROCEDURE [dbo].[DeleteTab]
@TabId Int -- ID of tab to delete; Not Null and > 0
AS
BEGIN
DECLARE @TabOrder Int
DECLARE @ParentId Int
DECLARE @ContentItemId Int
SELECT @TabOrder = TabOrder, @ParentId = ParentID, @ContentItemID = ContentItemID FROM dbo.[Tabs] WHERE TabID = @TabId
-- Delete Tab --
DELETE FROM dbo.[Tabs] WHERE TabID = @TabId
-- Update TabOrder of remaining Tabs --
UPDATE dbo.[Tabs]
SET TabOrder = TabOrder - 2
WHERE IsNull(ParentID, -1) = IsNull(@ParentId , -1) AND TabOrder > @TabOrder
-- Delete Content Item --
DELETE FROM dbo.[ContentItems] WHERE ContentItemID = @ContentItemId
END
Thanks!
These Forums are for the discussion of the open source CMS DNN platform and ecosystem.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.