Skip to content

Conversation

@tvatavuk
Copy link
Contributor

@tvatavuk tvatavuk commented Dec 9, 2025

Fixes #6810

Summary

New pages behave correctly for all combinations of Versioning and Workflow settings:

TODO

  • Add an upgrade SQL script to repair pages left in an invalid workflow state by earlier versions.
    Specifically, auto-publish pages that were incorrectly created as Draft when:
    • Versioning = On and Workflow = Off
    • Versioning = On and Workflow = Direct Publish

Copilot AI review requested due to automatic review settings December 9, 2025 19:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where new pages remained in Draft status when Versioning was enabled but Workflow was disabled. The fix ensures pages are created with the correct published state for all combinations of Versioning and Workflow settings, particularly addressing the broken case where Versioning=On and Workflow=Off.

Key changes:

  • Adds logic to hide workflow menu items (Complete/Discard) when Direct Publish workflow is active, reducing UI confusion
  • Refactors workflow information display in PersonaBar to show more accurate state information even when no explicit state is assigned
  • Fixes portal ID retrieval in WorkflowHelper to use the tab's portal ID instead of current portal settings

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Dnn.AdminExperience/EditBar/Dnn.EditBar.UI/Items/WorkflowBaseMenuItem.cs Adds IsDirectPublishWorkflow property to identify when Direct Publish workflow is active
Dnn.AdminExperience/EditBar/Dnn.EditBar.UI/Items/DiscardWorkflowMenu.cs Updates visibility logic to hide discard menu when Direct Publish workflow is active
Dnn.AdminExperience/EditBar/Dnn.EditBar.UI/Items/CompleteWorkflowMenu.cs Updates visibility logic to hide complete menu when Direct Publish workflow is active
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Components/Pages/WorkflowHelper.cs Fixes potential null reference by using tab's PortalID instead of PortalSettings.Current
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Components/Pages/PagesControllerImpl.cs Refactors workflow handling to determine StateName and WorkflowName with proper null handling when StateID is not set

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mitchelsellers
Copy link
Contributor

@tvatavuk Can you look at the merge issue here?

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor Author

@tvatavuk tvatavuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge issue resolved

Copy link
Contributor

@valadas valadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@valadas valadas added this to the 10.2.1 milestone Dec 23, 2025
@valadas
Copy link
Contributor

valadas commented Dec 23, 2025

@tvatavuk looks like there are a couple of build errors.

@tvatavuk
Copy link
Contributor Author

@tvatavuk looks like there are a couple of build errors.

The build issues should be resolved with commit 5a1405b.
After applying it, I was able to complete a full local DNN build and perform a clean install without any errors.

image image

@valadas
Copy link
Contributor

valadas commented Dec 23, 2025

Awesome! Thanks a lot @tvatavuk

@valadas valadas merged commit 39811e5 into dnnsoftware:develop Dec 23, 2025
3 checks passed
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]: New pages remain in Draft when Versioning is enabled and Workflow is disabled

3 participants