dotnet / dotnet/docfx

[Bug] redirect_url failing on docfx build with uid not set

Open
#10,745 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 9m
Merged PRs (30d)
11

Description

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. You can inspect it on cloning this locally: https://github.com/DevTKSS/DevTKSS.Uno.SampleApps/commit/a93d48856e1b76b98cd70fe52ace3b6c359a90e6
1. use the redirect_uri on the index.md to point to a nested default landing page (loc docs)
```md
---
redirect_url: 'articles/de/Introduction-de.html'
---
```
tryed also with " and without and with the [ brackets around, no change.

**Expected behavior**
A clear and concise description of what you expected to happen.

should work as described in the docs: https://dotnet.github.io/docfx/docs/config.html#url-redirects

**Context (please complete the following information):**
- OS: Windows 11
- Docfx version: 2.78.3+850a61c2ecb83b0bda21448f1393e480934556fd

**Additional context**
Add any other context about the problem here.

Stacktrace
```bash
Building 14 file(s) in ResourceDocumentProcessor(ValidateResourceMetadata)...
Building 7 file(s) in TocDocumentProcessor(BuildTocDocument)...
Building 19 file(s) in ConceptualDocumentProcessor(BuildConceptualDocument=>ValidateConceptualDocumentMetadata)...
Building 71 file(s) in ManagedReferenceDocumentProcessor(BuildManagedReferenceDocument=>SplitClassPageToMemberLevel=>ValidateManagedReferenceDocumentMetadata=>ApplyOverwriteDocumentForMref=>FillReferenceInformation=>FillMetadata)...
C:\Users\Sonja\source\repos\DevTKSS\DevTKSS.Uno.SampleApps\doc\articles\de\HowTo-Setup-DevelopmentEnvironment-de.md: warning invalid-yaml-header: While scanning a multiline plain scalar, found invalid mapping.
C:\Users\Sonja\source\repos\DevTKSS\DevTKSS.Uno.SampleApps\doc\articles\de\Navigation\Extensions-Navigation-de.md: warning invalid-yaml-header: Exception during deserialization
C:\Users\Sonja\source\repos\DevTKSS\DevTKSS.Uno.SampleApps\doc\articles\de\Introduction-de.md: warning invalid-yaml-header: Exception during deserialization
C:\Users\Sonja\source\repos\DevTKSS\DevTKSS.Uno.SampleApps\doc\index.md: error: Trouble processing file - C:\Users\Sonja\source\repos\DevTKSS\DevTKSS.Uno.SampleApps\doc\index.md, with error - Required properties {{uid}} are not set. Note that keys are case sensitive.
AggregateException: One or more errors occurred. (Required properties {{uid}} are not set. Note that keys
are case sensitive.)
InvalidDataException: Required properties {{uid}} are not set. Note that keys are case sensitive.
at OverwriteDocumentModel TransformModel(string filePath, YamlHtmlPart part) in MarkdownReader.cs:
52
at OverwriteDocumentModel b__0(YamlHtmlPart part) in MarkdownReader.cs:24
at void Fill(ReadOnlySpan source, Span destination, Func func)
at List ToList()
at void BuildOverwrite(IHostService host, FileModel model) in BuildReferenceDocumentBase.cs:43
at void Build(FileModel model, IHostService host) in BuildReferenceDocumentBase.cs:32
at void b__1(IDocumentBuildStep buildStep) in CompilePhaseHandler.cs:118
at void RunBuildSteps(IEnumerable buildSteps, Action action
) in CompilePhaseHandler.cs:153
at void b__0(FileModel m) in CompilePhaseHandler.cs:111
at void b__0(TElement s) in DocumentExceptionExtensions.cs:95
at void b__1(ref RangeWorker currentWorker, long timeout, out bool
replicationDelegateYieldedBeforeCompletion)
at void b__1(ref RangeWorker currentWorker, long timeout, out bool
replicationDelegateYieldedBeforeCompletion)
at void Execute()
at void Run(ReplicatableUserAction action, ParallelOptions options, bool
stopOnFirstFailure)
at ParallelLoopResult ForWorker(TInt fromInclusive, TInt toExclusive, ParallelOptions
parallelOptions, Action body, Action bodyWithState, Func bodyWithLocal, Func localInit, Action localFinally
)
at ParallelLoopResult ForWorker(TInt fromInclusive, TInt toExclusive, ParallelOptions
parallelOptions, Action body, Action bodyWithState, Func bodyWithLocal, Func localInit, Action localFinally
)
at ParallelLoopResult ForEachWorker(IEnumerable source, ParallelOptions
parallelOptions, Action body, Action bodyWithState,
Action bodyWithStateAndIndex, Func bodyWithStateAndLocal, Func
bodyWithEverything, Func localInit, Action localFinally)
at ParallelLoopResult ForEach(IEnumerable source, ParallelOptions parallelOptions,
Action body)
at void RunAll(IEnumerable elements, Action action, int parallelism,
CancellationToken cancellationToken) in DocumentExceptionExtensions.cs:84
at void RunAll(IReadOnlyList elements, Action action, int parallelism,
CancellationToken cancellationToken) in DocumentExceptionExtensions.cs:68
at void Build(HostService hostService, int maxParallelism) in CompilePhaseHandler.cs:105
at void Handle(List hostServices, int maxParallelism) in CompilePhaseHandler.cs:49
at Manifest Build(DocumentBuildParameters parameters, IMarkdownService markdownService,
CancellationToken cancellationToken) in SingleDocumentBuilder.cs:69
at void Build(IList parameters, string outputDirectory, CancellationToken
cancellationToken) in DocumentBuilder.cs:123
at void BuildDocument(BuildJsonConfig config, BuildOptions options, TemplateManager templateManager,
string baseDirectory, string outputDirectory, string templateDirectory, CancellationToken
cancellationToken) in DocumentBuilderWrapper.cs:42
at string Exec(BuildJsonConfig config, BuildOptions options, string configDirectory, string
outputDirectory, CancellationToken cancellationToken) in RunBuild.cs:39
at void b__0() in BuildCommand.cs:25
at int Run(LogOptions options, Action run) in CommandHelper.cs:48
at int Execute(CommandContext context, BuildCommandOptions settings) in BuildCommand.cs:15
at Task Execute(CommandContext context, CommandSettings settings) in CommandOfT.cs:40
at async Task Execute(CommandTree leaf, CommandTree tree, CommandContext context, ITypeResolver
resolver, IConfiguration configuration) in CommandExecutor.cs:166
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.