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

Aberta
#232 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
56/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
javascript
Domínio
backend

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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?

Linguagem predominante
JavaScript
Estrelas
38
Forks
41
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de DNNCommunity/DNN.Blog

Todas as issues de DNNCommunity/DNN.Blog

Issues semelhantes

Mais issues de JavaScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.