For the listing page of the Web Channel Snippets, the PageConfiguration.HeaderActions.AddLink and PageConfiguration.AddEditRowAction are [Obsolete] in 30.0.1 and 30.2.0 which result in scan vulnerabilities. The deprecated suggestion is "Use AddLink with PageParameterValues instead".
PageConfiguration.HeaderActions.AddLink<WebChannelSnippetCreatePage>(
label: stringLocalizer["New snippet"],
parameters: WebChannelSettingsId.ToString());
Here is the closest configuration that isn't giving the deprecated warning. However, running this results in an error: Parameter for the page type '<Namespace>.Pages.WebChannelSettings.WebChannelSettingsEditSection' is missing. I've reviewed the github training-guides repository also, but the version is still 29.6.1.
PageConfiguration.HeaderActions.AddLink<WebChannelSnippetCreatePage>(
label: stringLocalizer["New snippet"],
icon: Icons.Plus,
parameters: new PageParameterValues
{
{ typeof(WebChannelSnippetEditSection), WebChannelSettingsId }
});
When running the [Obsolete] code, the application returns the same error even though the record has been created: Message: Parameter for the page type 'GL.Kentico.Admin.Pages.WebChannelSettings.WebChannelSettingsEditSection' is missing.
Additionally, in the ConfigurePage of the Create Page, AdditionalUrlParameters.Add is now AdditionalLinkParameters.Add
// Obsolete
AdditionalUrlParameters.Add(WebChannelSettingsId.ToString());
// Appears to be working as intended
AdditionalLinkParameters.Add(
new PageParameterValues
{
{ typeof(WebChannelSnippetCreatePage), WebChannelSettingsId }
});
Any suggestions?
Environment
- Xperience by Kentico version: [30.0.1 & 30.2.0]
- .NET version: [8]
- Execution environment: [Private cloud (AWS)]
- https://docs.kentico.com/x/add_channels_to_module_guides
https://github.com/Kentico/xperience-by-kentico-training-guides