Error at <.Content> while upgraded from learn to relearn theme in hugo 0.129.0v

Currently, I am using learn theme with hugo 0.96.0v. Now I need zoom in and zoom out functionality for mermaid diagrams that relearn theme is offering. I have update hugo 0.129.0v and replaced learn theme with relearn theme. When I am building the site, it throws below error.
Below are the contents of single.html

{{ partial “header.html” . }}

{{ if .Content}}


{{ .Content }}

{{ else }}

No content available


{{ end }}

{{with .Params.LastModifierDisplayName}} {{ . }} {{with $.Date}} {{ .Format "02/01/2006" }}{{end}} {{end}}

{{ partial “footer.html” . }}

and the image.html contains this below line resulting in error

{{- $u := urls.Parse .url }}

Error: error building site: render: failed to render pages: render of “page” failed: “\layouts_default\single.html:3:6”: execute of template failed: template: _default/single.html:3:6: executing “_default/single.html” at <.Content>: error calling Content: “\content\non-functional\data-services-file-block-and-object-storage\migration\anf-tax-professional\anf-tax-migrations-rb.md:1:1”: execute of template failed: template: _default/_markup/render-image.html:2:4: executing “_default/_markup/render-image.html” at <partial “shortcodes/image.html” (dict “page” .Page “url” .Destination “title” .Title “alt” .Text “id” $id “attributes” .Attributes)>: error calling partial: “\themes\hugo-theme-relearn-main\layouts\partials\shortcodes\image.html:19:14”: execute of template failed: template: partials/shortcodes/image.html:19:14: executing “partials/shortcodes/image.html” at <urls.Parse>: error calling Parse: parse “Tax%images/image028.png”: invalid URL escape “%im”

please suggest.

Posting an error message without any context will most probably not get you any useful help.

In this particular case, just have a look at the URL in the last line and fix that.

1 Like

@McShelby

Without seeing your code, the error message says it all:

parse “Tax%images/image028.png”: invalid URL escape “%im”

1 Like

I have added the details about the error. please check.

That’s not helpful, either. You have a malformed image URL in one of your content files. Search for Tax in them and fix the URL.

Also, code should be posted as such, namely fenced by 3 backticks:
```
code goes here
```

In general, your chances to get help here are a lot better if you post a link to your repository so that people can see your code at once instead of going forwards and backwards asking for snippets that are more or less useless because their lack of context.

1 Like

Url issue is fixed once I removed that url causing the issue. I am getting below errror now.

error calling partial: partial “content-recursive.html” timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the ‘timeout’ config setting.
below are the contents of content-recursive.html

{{ $child_pages := union .Sections .Pages }}
{{ range $child_pages.ByWeight }}
<section id="{{ .Page.File.UniqueID }}">
    {{if eq .Type "category"}}
        <h1 class="title">
            {{ .Title }}
        </h1>
        {{ partial "breadcrumb.html" . }}
        <div class="content" data-url="{{.RelPermalink}}">
            {{partial "category-template.html" .}}  
        </div>
    {{else if eq .Type "capability"}}
        <h1 class="title">
            {{ .Title }}
        </h1>
        {{ partial "breadcrumb.html" . }}
        <div class="content" data-url="{{.RelPermalink}}">
            {{partial "capability-template.html" .}}  
        </div>
    {{else if eq .Type "service"}}
        <h1 class="title">
            {{ .Title }}
        </h1>
        {{ partial "breadcrumb.html" . }}
        <div class="content" data-url="{{.RelPermalink}}">
            {{partial "services-template.html" .}}
        </div>
    {{else if eq .Type "future"}}
        <!-- <h1 class="title">
            {{ .Title }}
        </h1>
        <div class="content">
            <p>Content coming soon.</p>
        </div> -->
        <!-- {{partial "future-template.html" .}} -->
    {{else if and (.Title) (not (eq .Type "future"))}}
        <!-- Only differentiator from additional.md to pattern or 5th level content -->
        <h1 class="title">
            {{ .Title }}
        </h1>
        {{ partial "breadcrumb.html" . }}
        <div class="content" data-url="{{.RelPermalink}}">
            {{.Content}}
        </div>
    {{end}}
    {{ partial "content-recursive.html" . }}    
</section>
{{ end }}

I have many timeout variables throughout the code. Could you please let me know where to find this timeout setting.

I am not sure, what you are doing. content-resursive.html is not part of the Relearn distribution.

This is most likely due to infinite recursion.

Increasing the timeout here will most likely not solve your issue but only increase the time you will wait to see this error again.

Without seeing your repo, it’s impossible to help you.

I can’t show you the repo. It is internal. For the time being, I have commented the particular line and continue building the site. It is built successfully.

I am seeing some errors related to reaching the css files Ex: Failed to load resource: the server responded with a status of 404 (Not Found) for files hybrid.css, hugo-theme.css

Please help me on how to add these files

How, if nobody knows what your code looks like? Your best bet is to check what URL the browser uses for the CSS files and then correct your code.