Blog 7.0.0 RC1, Blog Settings, Some Templates Throw Object reference not set

Aperta
#232 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
56/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
backend

Direzione di ricerca

Start by tracing PostInfo.PermaLink(TabInfo tab) and the GetProperty token path named in the stack trace; the report points to a null parent tab when templates render latestPosts[System]. Reproduce by switching templates in Blog Settings on the stated DNN and module versions, then check that the affected templates render without the null reference. The Admin Logs observation is described as a separate concern.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

Fresh DNN install, after getting the Blog set up and adding a post, I went into (module) Blog Settings and tried switching to other Templates. "latestPosts[System]" and a few others cause the following error after you click Update and the page tries to display the previously working list of blogs.

Error: Object reference not set to an instance of an object.

In: at DotNetNuke.Modules.Blog.Core.Entities.Posts.PostInfo.PermaLink(TabInfo tab) at DotNetNuke.Modules.Blog.Core.Entities.Posts.PostInfo.GetProperty(String strPropertyName, String strFormat, CultureInfo formatProvider, UserInfo AccessingUser, Scope AccessLevel, Boolean& PropertyNotFound) at DotNetNuke.Modules.Blog.Core.Templating.BaseCustomTokenReplace.replacedTokenValue(String strObjectName, String strPropertyName, String strFormat) at DotNetNuke.Modules.Blog.Core.Templating.BaseTokenReplace.ReplaceTokenMatch(Match m) at System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat) at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator) at DotNetNuke.Modules.Blog.Core.Templating.GenericTokenReplace.ReplaceTokens(String strSourceText) at DotNetNuke.Modules.Blog.Core.Templating.Template.ReplaceContents()

Looks like the PermaLink() throws when there is no parent tab (null).

Software Versions

  • DNN: 10.04.01
  • Module: 7.0.0 RC1

Expected behavior

All Templates should work (or old, non-useful ones should be removed?).

Error log

Interesting note - though the error displayed on the page, nothing was written to the Admin Logs. I feel like it should have been. Separate issue?

Lingua principale
JavaScript
Stelle
38
Fork
41
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DNNCommunity/DNN.Blog

Tutte le issue di DNNCommunity/DNN.Blog

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.