Docs module exception
I followed the document https://abp.io/documents/abp/latest/Modules/Docs, but when trying with local FileSystem I am getting an exception:
NullReferenceException: Object reference not set to an instance of an object.
AspNetCore._Pages_Documents_Project_Index.ExecuteAsync() in Index.cshtml
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable
Any idea where to look to fix it ?
Have you inserted any record to DocsProjects project ?
Yes, the SQL statement as described in the document.
INSERT [dbo].[DocsProjects] ([Id], [Name], [ShortName], [Format], [DefaultDocumentName], [NavigationDocumentName], [MinimumVersion], [DocumentStoreType], [ExtraProperties], [MainWebsiteUrl], [LatestVersionBranchName]) VALUES (N'12f21123-e08e-4f15-bedb-ae0b2d939659', N'ABP framework (FileSystem)', N'abp', N'md', N'Index', N'docs-nav.json', NULL, N'FileSystem', N'{"Path":"C:\Github\abp\docs\en"}', N'/', NULL)
And I copied the contents of the default abp/docs/en folder to the C:\Github\abp\docs\en directory.
I added now also the GitHub DocumentStoreType to the DocsProjects table and now when I access the documentation tab I get to choose from the two projects. And they are both working now ? Strang thing however is that I can also choose version when I select the FileSystem project, i thought this was only working for GitHub. Or is the docs module not working yet with the FileSystem storetype and it is always using Github ?
Another question: If I fork the abp repository to my own github account and change the Url in the DocProjects table to reflect to the new Url I get a DocumentNotFoundException.
https://github.com/geertveenstra/abp/tree/{version}/docs/en/
When I change it back to
https://github.com/abpframework/abp/tree/{version}/docs/en/
it is working again ?
I am using the same GitHubAccessToken for both urls.
I was under the assumption that I should be able to use my own repository with this module ?
Any comments ? I am still unable to use this with my own documents location.
I added now also the GitHub DocumentStoreType to the DocsProjects table and now when I access the documentation tab I get to choose from the two projects. And they are both working now ? Strang thing however is that I can also choose version when I select the FileSystem project, i thought this was only working for GitHub. Or is the docs module not working yet with the FileSystem storetype and it is always using Github ?
It may be because of caching.
https://github.com/abpframework/abp/blob/a92686bc997dee46ba24cbdf340e831e146065d9/modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/DocumentAppService.cs#L66
If I fork the abp repository to my own github account and change the Url in the DocProjects table to reflect to the new Url I get a DocumentNotFoundException.
Bug confirmed. I've just created a new issue.
https://github.com/abpframework/abp/issues/778
@GeertVeenstra I think every problem you're talking about should end now, can you test them?
@yekalkan Thanks, I have tried to compile the docs solution now several times but I keep getting around 75 errors in Visual Studio about missing references... I disabled the automatic Nuget download as suggested in the modules documentation. What are the steps after I download the current source as ZIP file ?
Have you run dotnet-restore command?
OK, I feel stupid now, it seems I need to run the main build-all.ps1 as well. It is compiling now and working as expected.
Thank you very much for your help !