10000 fix: MoveTabBefore and MoveTabAfter stored procedures same TabOrder h… by timi-ty · Pull Request #6385 · dnnsoftware/Dnn.Platform · GitHub
[go: up one dir, main page]

Skip to content

fix: MoveTabBefore and MoveTabAfter stored procedures same TabOrder h… #6385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

timi-ty
Copy link
Contributor
@timi-ty timi-ty commented Feb 17, 2025

Fixes #6384

Summary

The issue occurs when attempting to reorder tabs (pages) that have identical TabOrder values. The current implementation of MoveTabBefore and MoveTabAfter procedures fails to handle this edge case correctly.

Changes made

Fixed issue with tab ordering when multiple tabs share the same TabOrder value. Key changes:

  1. Added TabId as secondary sorting criteria when TabOrder values are equal
  2. Modified tab position logic to correctly handle duplicate TabOrder scenarios:
    • For MoveTabAfter: Places target tab at AfterTab's order + 1
    • For MoveTabBefore: Places target tab at BeforeTab's order - 1
  3. Added proper handling of tabs with same TabOrder but different TabIds
  4. Implemented final ordering pass that preserves intentional TabOrder gaps while ensuring consistent sequencing
  5. Added transaction management for atomic updates

These changes ensure tabs are inserted at the exact specified position regardless of duplicate TabOrder values in the sequence.

Results

The Search Results page was successfully moved between Page 1, Page 2, Page 3 and Page 4 which have the same TabOrder value.

Screenshot 2025-02-17 143630

Screenshot 2025-02-17 143952

N.B.: My expectation was that the system would use the stored procedures from the most recent versioned SqlDataProvider in which they are available- 07.03.03.SqlDataProvider in this case. However I found that when installing the website, the system used the stored procedures MoveTabBefore and MoveTabAfter defined in DotNetNuke.Data.SqlDataProvider. This is the file that was modified in this PR.

@timi-ty
Copy link
Contributor Author
timi-ty commented Feb 17, 2025

@microsoft-github-policy-service agree company="Trilogy"

@bdukes bdukes added this to the 9.13.8 milestone Feb 17, 2025
@valadas
Copy link
Contributor
valadas commented Feb 20, 2025

@timi-ty we have DNN 10 in RC stage and we have done an SQL revamp for v10, which would make this hard to merge for v10 with a git conflict. Could you retarget this fix towards release/10.0.0 branch?

@valadas valadas removed this from the 9.13.8 milestone Feb 26, 2025
@mitchelsellers
Copy link
Contributor

Closing this item for now, the requested rebase was not done, additionally, we will need the changes as part of an upgrade script if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Faulty MoveTabAfter and MoveTabBefore logic
4 participants
0