Incorrect tab order on new portals

Description

When creating a new portal from a template the new pages are created with a taborder that continues from the max(taborder) from the DB.
This is incorrect, since each portal needs to start it's taborder from 1.

The error is on the SP AddTabToEnd since it does not filter tabs by portalid when calculating the new taborder:

SET @TabOrder = (SELECT MAX(TabOrder) FROM dbo.Tabs WHERE (ParentId = @ParentId OR (ParentId IS NULL AND @ParentID IS NULL)))

Should be:

SET @TabOrder = (SELECT MAX(TabOrder) FROM dbo.Tabs WHERE Portalid = @PortalID AND
(ParentId = @ParentId OR (ParentId IS NULL AND @ParentID IS NULL)))

QA Test Plan

None

Activity

Show:
Ken Grierson
September 15, 2014, 4:44 PM
Edited

Not fixed in 7.3.3 build 95

Test Case..
in latest 7.3.3 build log in as Host
Go Host > Site Management
Create a Parent or Child portal
Using SMSS connect to the database of the site
click "New Query" button

Use <database name here>
Select * from dbo.Tabs where PortalID=0

Open a 2nd new query window
Use <database name here>
Select * from dbo.Tabs where PortalID=<new parent/child portal ID>

Actual Result:
In Platform the tab id's of the new parent/child portal are in numerical ordering of Portal 0 (zero)
In Content they don't numerically follow Portal 0 (zero) but they aren't starting from 1 (one) either

Expected Result:
Any parent/child portal tab id's would start from 1 (one)

SCREEN CAST: http://screencast.com/t/0HZqqBcyHBg

Vicenç Masanas
September 18, 2014, 1:14 PM

TabId will NEVER start at 1 for new portals. This is the PK of the table. The fix was for reseting the TabOrder to 1 on new portals.
Before taborder started at MAX+1 for all portals, which was not correct. Taborder should start at 1 for all new portals.

Joe Brinkman
September 18, 2014, 1:16 PM

See latest comment from Vicenc

Sebastian Leupold
September 18, 2014, 5:36 PM

taborder should start at 1 for each parent page, not portal

Bing Wu
September 26, 2014, 7:49 PM

Now it is good.
TabOrder always starts from "1" by Portal.

Please be aware of there is a bug noticed: DNN-5899, about portal creation, not sure if they are related.

Noticed a potential performance issue during portal creation:

  • When create a new template, purposely check off all pages with TabOrder = 1.
    The generation of the portal takes longer time.

Assignee

Unassigned

Reporter

Vicenç Masanas

Story Size

Unknown

Severity

Major

Triage

New

Reported in Build #

None

Fixed in Build

Dev Owner

None

Includes Code Fix

Yes

Documentation Required

No

Trouble Ticket

None

Requires More Info

None

QA Story Points

None

QA Owner

None

Injected

None

Automation Required

None

Code Review Owner

None

Fix versions

Priority

Medium
Configure