-
-
Notifications
You must be signed in to change notification settings - Fork 763
Fix HtmlModule 10 upgrade issues with localized sites #6560
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
base: develop
Are you sure you want to change the base?
Conversation
Awesome, thanks for taking care of this @tvatavuk |
There was a problem hiding this 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 addresses upgrade failures in the HTML module on localized sites by adding robust workflow migration both in SQL and C#, updating the module manifest, and adjusting HTML path handling logic.
- Adds two new SQL scripts to ensure missing workflows/states are created (10.00.00.03) and to deduplicate localized workflows after migration (10.00.02).
- Introduces
LocalizationHelper
andMigrateHelper
in C# and updatesHtmlTextController
/EditHtml
to run the migration and use the revisedManageRelativePaths
overload. - Updates the module manifest (
dnn_HTML.dnn
), bumps the version to 10.00.02, and amends the project file to include new scripts and components.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
Website/Providers/DataProviders/SqlDataProvider/10.00.00.03.SqlDataProvider | New script to create missing content workflows and states |
Tests/DotNetNuke.Tests.Modules/Html/HtmlTextControllerTests.cs | Updated tests for the new two-parameter ManageRelativePaths |
Modules/HTML/dnn_HTML.dnn | Bumped module version, added 10.00.02 install script, updated upgrade list |
Modules/HTML/Providers/DataProviders/SqlDataProvider/10.00.02.SqlDataProvider | New script to deduplicate workflows and states after migration |
Modules/HTML/Providers/DataProviders/SqlDataProvider/10.00.00.SqlDataProvider | Refactored MigrateHtmlWorkflows SP to use localization lists |
Modules/HTML/EditHtml.ascx.cs | Adjusted calls to ManageRelativePaths to match the new overload |
Modules/HTML/DotNetNuke.Modules.Html.csproj | Added LocalizationHelper.cs , MigrateHelper.cs , included new SQL scripts |
Modules/HTML/Components/MigrateHelper.cs | New helper to invoke migration SP and clean up old schema |
Modules/HTML/Components/LocalizationHelper.cs | New helper to load state name localizations |
Modules/HTML/Components/HtmlTextController.cs | Removed obsolete usings, updated FormatHtmlText and UpgradeModule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing sticks out to me. @mitchelsellers @bdukes if you one of you want's to approv/merge, I think we would be ready to do a v10.0.2 that would not have a known issue in the release notes...
Not yet - I have separate code for #6618, which I'm planning to complete for a future DNN release after 10.00.02, assuming this PR becomes part of that release. |
In testing, there was an error during step 1 from
This site has |
…tes after migration
…pgradeable for version 10.00.00
Thanks a lot for testing and reporting this! The issue occurs because the script attempts to insert a new content workflow when a workflow with the same The complication arises because Missing step was to normalize workflow keys, so I’ve added /*------------------------------------------------------
1. Ensure known workflows has expected key
------------------------------------------------------*/
-- ensure that each workflow with name 'Direct Publish' has workflow key 'DirectPublish'
UPDATE {databaseOwner}{objectQualifier}ContentWorkflows
SET WorkflowKey = 'DirectPublish'
WHERE WorkflowName = N'Direct Publish' AND WorkflowKey <> 'DirectPublish';
-- ensure that each workflow with name 'Save Draft' has workflow key 'SaveDraft'
UPDATE {databaseOwner}{objectQualifier}ContentWorkflows
SET WorkflowKey = 'SaveDraft'
WHERE WorkflowName = N'Save Draft' AND WorkflowKey <> 'SaveDraft';
-- ensure that each workflow with name 'Content Approval' has workflow key 'ContentApproval'
UPDATE {databaseOwner}{objectQualifier}ContentWorkflows
SET WorkflowKey = 'ContentApproval'
WHERE WorkflowName = N'Content Approval' AND WorkflowKey <> 'ContentApproval'; I’ve tested against clean installs and dnn 9.13.9 upgrade scenario (with deleted WorkflowKey for ContentApproval) – all pass. Thanks again for the quick report! |
Thanks for the quick update @tvatavuk! Unfortunately, I now get a similar error from the
I'm testing this with Site A from my previous testing. This includes "Save Draft" workflows where Draft has There are also workflows named "Folders: Content Approval" which don't get a workflow key, but I don't think those are causing any issue at this point. I guess there will need to be an additional check that the given Thanks again for the quick turnaround on these changes! |
Fixes #6494
Summary
There is an upgrade issue affecting localized sites. After upgrading the HtmlModule to versions 10.00.00 or 10.00.01, exceptions may occur as explained in #6494.
The migration from the built-in HTML workflow is not correctly mapped to DNN content workflows when workflow names and states are localized. This depends on the admin-selected language at the time of site creation.
This fix addresses that issue.
This PR makes upgrading to DNN 10.00.02+ to resolve these errors. Alternatively, for sites already on 10.00.00 or 10.00.01, running the SQL script at
DesktopModules\HTML\Providers\DataProviders\SqlDataProvider\10.00.02.SqlDataProvider
in the DNN SQL Console can also resolve the issues caused by content workflow localization.TODO: