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

delete #7280

Closed
ghost opened this issue May 15, 2020 · 6 comments
Closed

delete #7280

ghost opened this issue May 15, 2020 · 6 comments
Labels

Comments

@ghost
Copy link

ghost commented May 15, 2020

You've been telling me to relax all the way here, and now you're telling
me just to be myself?
		-- The Return of the Secaucus Seven
@stale
Copy link

stale bot commented Aug 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Aug 16, 2020
@Pangoraw
Copy link

Pangoraw commented Sep 6, 2020

I have the same issue where I am trying to use RenderString in my baseof.html, and make the 404.html define a main block and the RenderString would not be present on the Page object supplied.

baseof.html

Base {{ .RenderString "[aaa](https://gohugo.io)" }}:
{{ block "main" . }}{{ end }}

404.html

{{ define "main" }}
Page not found
{{ end }}

Error:

executing "404.html" at <.RenderString>: error calling RenderString: runtime error: invalid memory address or nil pointer dereference

Looking at the code, it seems that the 404.html file is having a special legacy treatment just like robots.txt or sitemap.xml, is there still a reason to keep it ?

@stale stale bot removed the Stale label Sep 6, 2020
@matt-antone
Copy link

I'm was also having the same issue. I got around it by using a 404.html template in layouts/_default. It didn't work when using layouts/404.html. No idea why.

@superobertking
Copy link

superobertking commented Oct 3, 2020

Same issue here.

I'm was also having the same issue. I got around it by using a 404.html template in layouts/_default. It didn't work when using layouts/404.html. No idea why.

This works perfectly for me!

On no, sorry. This is not working. 404.html will not be generated on my side.
It compiled successfully after a fresh build, I guess may be similar to #5138.

From https://gohugo.io/templates/404/, maybe relURL is another way to go.

@chalin
Copy link

chalin commented Sep 22, 2021

Yeah, still getting "RenderString: runtime error: invalid memory address or nil pointer dereference" on a build or serve using Hugo v0.87.

@ghost ghost changed the title .RenderString gives a warning when not creating _index.md and errors on 404 delete Jan 28, 2022
@ghost ghost closed this as completed Jan 28, 2022
@github-actions
Copy link

github-actions bot commented Feb 5, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants