Starts in:
2 DAYS
0 HR
32 MIN
1 SEC
Starts in:
2 D
0 H
32 M
1 S
Open Closed

Navigation issue in Doc module ABP v8.3.1 #8149


User avatar
0
Anjaneyulu created
  • ABP Framework version: v8.3.1
  • UI Type: MVC
  • Database System: EF Core (SQL Server) / MongoDB
  • **Tiered (for MVC) **: yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue: I have created the project using abp studio.
  • Added doc module using abp suite (same version as abp studio) , migration is successful.
  • Followed -> https://abp.io/docs/latest/modules/docs
  • Completed till -> Adding New Docs Project with github url (for testing have given the same abp documentation url)

After that when i try to go to my project and try /documents im navigating to homepage

While my expectation is to see abp docs


29 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share the logs.txt?

    liming.ma@volosoft.com

  • User Avatar
    0
    Anjaneyulu created

    Hi , I have shared the logs

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    This is the log of public website. I need all logs.txt of all websites. Can you share a test project directly so that I can check it locally?

    Thanks

    liming.ma@volosoft.com

  • User Avatar
    0
    Anjaneyulu created

    Hi I have shared the link in email

    Added steps.txt in the folder for the details

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok, I will check it asap and share the solution

  • User Avatar
    0
    Anjaneyulu created

    Thanks, Waiting with hundred eyes for your response

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I will fix the redirect problem,

    You can direct access the https://localhost:44317/documents/en/abp/latest

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    The fix code:

    using System.Collections.Generic;
    using System.Threading.Tasks;
    using Microsoft.AspNetCore.Mvc;
    using Microsoft.Extensions.Options;
    using Volo.Abp.DependencyInjection;
    using Volo.Docs;
    using Volo.Docs.Projects;
    
    namespace Ensurity.SampleDocsProject.Web.Public.Pages.Docs;
    
    [ExposeServices(typeof(Volo.Docs.Pages.Documents.IndexModel))]
    public class MyIndexModel : Volo.Docs.Pages.Documents.IndexModel
    {
        public string DocumentsUrlPrefix { get; set; }
    
        public IReadOnlyList<ProjectDto> Projects { get; set; }
    
        private readonly IProjectAppService _projectAppService;
        private readonly DocsUiOptions _uiOptions;
    
        public MyIndexModel(IProjectAppService projectAppService, IOptions<DocsUiOptions> urlOptions)
            : base(projectAppService, urlOptions)
        {
            _projectAppService = projectAppService;
            _uiOptions = urlOptions.Value;
        }
    
        public override async Task<IActionResult> OnGetAsync()
        {
            if (_uiOptions.SingleProjectMode.Enable)
            {
                return Redirect("/Documents/Project/Index");
            }
    
            var listResult = await _projectAppService.GetListAsync();
    
            if (listResult.Items.Count == 1)
            {
                return Redirect($"/Documents/Project/{listResult.Items[0].ShortName}");
            }
    
            Projects = listResult.Items;
    
            return Page();
        }
    }
    
    
  • User Avatar
    0
    Anjaneyulu created

    Hi maliming,

    Thanks for the Update. It really helps me.

    What i understand is that its a bug and we are extending the doc index model as a temporary fix now.

    It will be fixed in next versions, correct ?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Yes, We will fix this in next version.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    https://github.com/abpframework/abp/pull/21189/

  • User Avatar
    0
    Anjaneyulu created

    I have created a new docs project with same structure as abp

    doc en index.md docs-nav.json docs-params.json docs-lang.json

    Its branch is in "main" branch and added the project giturl as follows. {"GitHubRootUrl":"https://github.com/XXXXXXXXXXXXXXXXXXXXXXX/DemoDocumentation/tree/{version}/Docs","GitHubAccessToken":"github_pat_XXXXXXXXXXXXX","GitHubUserAgent":""}

    When i try to access https://localhost:44317/documents/en/demo/latest

    I got this exception.

    An unhandled exception occurred while processing the request.
    

    ArgumentException: 'main.0.0' is not a valid version string. (Parameter 'value')

    NuGet.Versioning.SemanticVersion.Parse(string value) Volo.Docs.GitHub.Documents.Version.SemanticVersionHelper.IsPreRelease(string version) Volo.Docs.Pages.Documents.Project.IndexModel+<>c.<GetLatestVersionInfo>b__137_0(VersionInfoViewModel v) System.Linq.Enumerable.TryGetFirst<TSource>(IEnumerable<TSource> source, Func<TSource, bool> predicate, out bool found) System.Linq.Enumerable.FirstOrDefault<TSource>(IEnumerable<TSource> source, Func<TSource, bool> predicate) Volo.Docs.Pages.Documents.Project.IndexModel.GetLatestVersionInfo(List<VersionInfoViewModel> versions) Volo.Docs.Pages.Documents.Project.IndexModel.TrySetVersionAsync() Volo.Docs.Pages.Documents.Project.IndexModel.SetPageAsync() Volo.Docs.Pages.Documents.Project.IndexModel.OnGetAsync()


    Also i have one more question? Do i need to build my project everytime i update my docs project or Will it directly pull from the git in runtime.

    In such case if im hosting my application in OnPrem deployment, where application maynot have access to internet, what could i do ?

    Thanks,

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please try to create a number release.(1.0.0)

    Will it directly pull from the git in runtime.

    It will use caching, but you can force it to get the latest from Github in the project page.

    In such case if im hosting my application in OnPrem deployment, where application maynot have access to internet, what could i do ?

    I don't know about the OnPrem deployment

    If you use Github as document source, your app must access the Github.com

  • User Avatar
    0
    Anjaneyulu created

    So if i do filesystem project it should help me with the cases where i dont reach internet. Am i correct ?

  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer

    Yes, You can use local filesystem as document source.

  • User Avatar
    0
    Anjaneyulu created

    If i build my application and published to a server.

    When ever i update the documentation, will it automatically update in the publised server page.

  • User Avatar
    0
    Anjaneyulu created

    I have created the release for the github main branch. But still same issue

    An unhandled exception occurred while processing the request. ArgumentException: 'main.0.0' is not a valid version string. (Parameter 'value')

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    When ever i update the documentation, will it automatically update in the publised server page.

    If the cache expires, the document will try to get the latest. https://github.com/abpframework/abp/blob/dev/modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/DocumentAppService.cs#L527-L547

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You can try to set this to 1.0.0

  • User Avatar
    0
    Anjaneyulu created

    I have tried it, i got this

    AbpRemoteCallException: An internal error occurred during your request! Volo.Abp.Http.Client.ClientProxying.ClientProxyBase<TService>.ThrowExceptionForResponseAsync(HttpResponseMessage response) Volo.Abp.Http.Client.ClientProxying.ClientProxyBase<TService>.RequestAsync(ClientProxyRequestContext requestContext) Volo.Abp.Http.Client.ClientProxying.ClientProxyBase<TService>.RequestAsync<T>(ClientProxyRequestContext requestContext) Volo.Abp.Http.Client.ClientProxying.ClientProxyBase<TService>.RequestAsync<T>(string methodName, ClientProxyRequestTypeValue arguments) Volo.Docs.Documents.DocsDocumentClientProxy.GetDefaultAsync(GetDefaultDocumentInput input) Volo.Docs.Pages.Documents.Project.IndexModel.GetSpecificDocumentOrDefaultAsync(string languageCode) Volo.Docs.Pages.Documents.Project.IndexModel.TrySetDocumentAsync() Volo.Docs.Pages.Documents.Project.IndexModel.SetPageAsync() Volo.Docs.Pages.Documents.Project.IndexModel.OnGetAsync()

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share logs.txt of all of your websites?

    Thanks.

    liming.ma@volosoft.com

  • User Avatar
    0
    Anjaneyulu created

    I have shared the logs of all projects in email

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The errors are:

    [ERR] repos/EnsurityTechnologies/XSenseDocumentation/releases was not found.

    Response status code does not indicate success: 404 (Not Found).: https://raw.githubusercontent.com/EnsurityTechnologies/XSenseDocumentation/1.0.0/Docs/en/Index.md

    What is your GitHub root URL?

    Have you set up a GitHub access token?

  • User Avatar
    0
    Anjaneyulu created

    Yes i have given the details.

    I have shared the github url and token in email

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you invite me to your GitHub repos?

    https://github.com/maliming

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06