dnnsoftware / Dnn.Platform

DNN (formerly DotNetNuke) is the leading open source web content management platform (CMS) in the Microsoft ecosystem.
https://dnncommunity.org/
MIT License
1.02k stars 745 forks source link

PersonaBar Themes blank when Importing Site Template with default theme that is not installed #4147

Open morganalori opened 3 years ago

morganalori commented 3 years ago

Description of bug

Persona Bar Themes blank when importing a Site Template that has a default theme set that is not installed on the target DNN Instance. The Persona Bar -> Themes flickers for a moment, but then is a blank, empty div in the iframe for Themes. This prevents the ability to fix the default theme for the newly created site. Updating the home page to an installed theme to resolve errors on page about missing theme did not have any effect on Persona Bar -> Themes.

Similar to https://github.com/dnnsoftware/Dnn.Platform/issues/3224 but while 3224 was an edge case (direct edit/delete of file), this problem is replicatable through the DNN UI; when a Site Template is imported, but the theme used is not present on the DNN Instance.

workaround: While a DBA can fix the entry for the Default Theme, this is not always an available option. Having the Persona Bar -> Theme recover gracefully when the default theme for a site is missing will allow the problem to be fixed through the UI.

Steps to reproduce

alternate steps to reproduce

Current behavior

Persona Bar -> Themes flashes then is empty as the iframe fails to display anything due to js error

Expected behavior

Themes pane displays with error about 'missing theme', so a replacement theme can be chosen (recover)

Screenshots

browserErrors

Error information

export-bundle.js throws an error in the browser console : Cannot read property 'themeName' of nulll at t.value

Additional context

Provide any additional context that may be helpful in understanding and/or resolving the bug.

Affected version

9.6.2

Affected browser

not applicable

Timo-Breumelhof commented 3 years ago

Right, I logged https://github.com/dnnsoftware/Dnn.Platform/issues/3224 but as you mentioned it's also an issue when importing a Site template. And, edge case or not IMO it's ridiculous that the PB "crashes" only if there's a theme file that it cannot find whatever the cause for that is..

stale[bot] commented 3 years ago

We have detected this issue has not had any activity during the last 90 days. That could mean this issue is no longer relevant and/or nobody has found the necessary time to address the issue. We are trying to keep the list of open issues limited to those issues that are relevant to the majority and to close the ones that have become 'stale' (inactive). If no further activity is detected within the next 14 days, the issue will be closed automatically. If new comments are are posted and/or a solution (pull request) is submitted for review that references this issue, the issue will not be closed. Closed issues can be reopened at any time in the future. Please remember those participating in this open source project are volunteers trying to help others and creating a better DNN Platform for all. Thank you for your continued involvement and contributions!

RockSolidSW commented 3 years ago

Is this issue in queue to be addressed? We are experiencing it as well. Thanks!

valadas commented 3 years ago

I have triaged the issue, now since it's open source, we just need a contributor to tackle it and send a PR...