[Bug]: Edit theme attribute fails to update skin and container due to case sensitive search
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Components/Themes/ThemesController.cs and read the tag-matching logic identified in the issue. Reproduce the failure with an ASCX tag whose attribute casing or order differs from the expected string, then determine how to handle those variations. Done means editing theme attributes updates the matching ASCX tag and the issue’s reproduction steps no longer fail.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- I have searched the existing issues
What happened?
Hi DNN Fam,
I tried Persona Bar → Themes → Edit Theme Attributes for the first time today and discovered that the feature is… very precise about markup formatting. 😊
What happened
The UI reports “saved successfully”, but the skin/container ASCX file doesn’t change because DNN doesn’t find the tag it intends to update.
Root cause
The matching logic uses a literal, case-sensitive string search and expects a very specific tag format (including attribute casing and ordering):
File: Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Components/Themes/ThemesController.cs
var strTag = "<dnn:" + updateTheme.Token + " runat=\"server\" id=\"dnn" + updateTheme.Token + "\""; var intOpenTag = strSkin.IndexOf(strTag); if (intOpenTag != -1) { ... }
So markup like this (perfectly valid and commonly used in commercial skins):
<dnn:BREADCRUMB ID="dnnBreadcrumb" runat="server" ... />
…won’t match because:
- ID vs id
- dnnBreadcrumb vs dnnBREADCRUMB
- attribute order can matter as well
This seems common in commercial skins, so Edit Theme Attributes can’t update those objects unless the ASCX tag is rewritten to match the exact expected format, which gets overwritten whenever you update the theme. However, any changes made via Persona Bar would also disappear, because it is not stored in the DB for example.
Questions
Does anyone have thoughts on the best approach? Is it already an improvement if the search would be case insensitive? Are skin object names eventually case sensitive or not? If the search should be independent of the order in which the attributes are listed, it would probably need something better than a string search (real HTML/XML or maybe regex parsing).
Best regards,
Andy9999
Steps to reproduce?
- Try to customize a skin object that does not have the precise format in your skin's layout or container ASCX. For example breadcrumb.
- Set an attribute, like CleanerMarkup=TRUE
- It reports that it was saved successfully.
- No change to the ASCX file as the skin object was not found unfortunately.
Current Behavior
No response
Expected Behavior
No response
Relevant log output
Anything else?
No response
Affected Versions
10.2.0 (latest v10 release)
What browsers are you seeing the problem on?
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
- Dominant language
- C#
- Stars
- 1.1k
- Forks
- 791
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 24
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dnnsoftware/Dnn.Platform
-
Status: New
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dnnsoftware/Dnn.Platform#7543 · 1 comment ·
Maintainers usually reply within 1 day
-
Status: New
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dnnsoftware/Dnn.Platform#6681 ·
Maintainers usually reply within 1 day
-
Status: New
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dnnsoftware/Dnn.Platform#6051 · 4 comments ·
Maintainers usually reply within 1 day
-
Status: New
Difficulty 3/5 1-2 days Newbie friendliness 45/100
dnnsoftware/Dnn.Platform#7555 ·
Maintainers usually reply within 1 day
-
Status: New
Difficulty 4/5 3-5 days Newbie friendliness 22/100
dnnsoftware/Dnn.Platform#7554 · 5 comments ·
Maintainers usually reply within 1 day
All issues in dnnsoftware/Dnn.Platform
Similar issues
-
documentation
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
-
bug misleading tooling trivial
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Docs example projects pinned to a literal library version instead of 3.*Possibly taken @DaveSkender claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
facioquo/stock-indicators-dotnet#2372 ·
Maintainers usually reply within 1 day
-
[Docs] officecli-docx SKILL.md still describes `\n` as a soft line break after #262Possibly taken @giprime claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Facepunch/sbox-public#12097 ·
Maintainers usually reply within 2 days