Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Prevent recursion when targeting current page #1057

Open
markdumay opened this issue Jul 29, 2024 · 0 comments
Open

[BUG] Prevent recursion when targeting current page #1057

markdumay opened this issue Jul 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@markdumay
Copy link
Collaborator

Describe the bug

Various elements such as the card support an optional argument to target a specific page. When the targeted page is identical to the current page, the Hugo build fails after a timeout.

To reproduce

Steps to reproduce the behavior:

  1. Clone the Hinode site
  2. Open the file exampleSite/content/en/blog/bootstrap-elements.md
  3. Replace the card path on line 128 from about to bootstrap-elements
  4. Start a local server with npm i && npm run start:example
  5. Observe the Hugo build output (wait for the timeout, 3mins by default)

Expected behavior

Hinode should detect a recursion and exit with an informative error message.

Log file

ERROR render of "404" failed: "[...]/gethinode/hinode/layouts/_default/baseof.html:26:16": execute of template failed: template: 404.html:26:16: executing "404.html" at <partial "utilities/GetSections.html" (dict "page" . "loading" $loading)>: error calling partial: partial "utilities/GetSections.html" timed out after 3m0s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.
[...]

Screenshots

N/A

Host environment

Please complete the following information where applicable.

  • Hinode version: [v0.24.23]
  • Host OS: [N/A]
  • Node version: [N/A]
  • Browser: [N/A]

Hugo environment

hugo v0.129.0+extended darwin/arm64 BuildDate=2024-07-17T13:29:16Z VendorInfo=brew
GOOS="darwin"
GOARCH="arm64"
GOVERSION="go1.22.5"
github.com/sass/libsass="3.6.5"
github.com/webmproject/libwebp="v1.3.2"
github.com/sass/dart-sass/protocol="2.7.1"
github.com/sass/dart-sass/compiler="1.77.8"
github.com/sass/dart-sass/implementation="1.77.8"
@markdumay markdumay added the bug Something isn't working label Jul 29, 2024
@markdumay markdumay changed the title [BUG] Prevent recursion when targeting a local page [BUG] Prevent recursion when targeting current page Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant