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

Content is not displayed #730

Open
fabiogeraci opened this issue Nov 3, 2022 · 9 comments
Open

Content is not displayed #730

fabiogeraci opened this issue Nov 3, 2022 · 9 comments

Comments

@fabiogeraci
Copy link

Error handling response: TypeError: Cannot read properties of null (reading 'codescript')
at chrome-extension://iamhhblhmpldjchjecmapgoikpjmmfoe/content/content.js:4:18
site.webmanifest:1 Failed to load resource: the server responded with a status of 404 (Not Found)
site.webmanifest:1 Manifest: Line: 1, column: 5, Unexpected data after root element.
site.webmanifest:1 Failed to load resource: the server responded with a status of 404 (Not Found)

@luizdepra
Copy link
Owner

Hey, @fabiogeraci.

Could you please provide us more information about the issue?

But, this line at chrome-extension://iamhhblhmpldjchjecmapgoikpjmmfoe/content/content.js:4:18 tells me that one of your browser extension is causing the issue. Try again on a private tab or disabling all extensions.

@fabiogeraci
Copy link
Author

Hey,
thank you for the quick response. I tried, as you suggested on a private tab as well as on firefox with no extensions and the outcome is the same

Failed to load resource: the server responded with a status of 404 (Not Found)

I am not actually sure that the issue is the theme I tried a different theme and it was not rendering correctly the examplesite

@luizdepra
Copy link
Owner

Which version of Hugo are you using?

Well, try running make demo and then access http://localhost:1313.
It should display something like this:

% make demo
hugo server -D --themesDir=../.. --source=exampleSite --bind 0.0.0.0
Start building sites …
hugo v0.102.3-b76146b129d7caa52417f8e914fc5b9271bf56fc+extended linux/amd64 BuildDate=2022-09-01T10:16:19Z VendorInfo=gohugoio
WARN 2022/11/03 15:22:29 The "twitter_simple" shortcode will soon require two named parameters: user and id. See "/home/luizdepra/dev/personal/web/hugo-coder/exampleSite/content/posts/rich-content.md:26:1"
WARN 2022/11/03 15:22:30 The "twitter_simple" shortcode will soon require two named parameters: user and id. See "/home/luizdepra/dev/personal/web/hugo-coder/exampleSite/content/posts/rich-content.pt-br.md:26:1"

                   | EN | PT-BR
-------------------+----+--------
  Pages            | 57 |    51
  Paginator pages  |  0 |     0
  Non-page files   |  0 |     0
  Static files     | 10 |    10
  Processed images |  0 |     0
  Aliases          | 23 |    19
  Sitemaps         |  2 |     1
  Cleaned          |  0 |     0

Built in 1414 ms
Watching for changes in /home/luizdepra/dev/personal/web/hugo-coder/{archetypes,assets,exampleSite,i18n,layouts,static}
Watching for config changes in exampleSite/config.toml, /home/luizdepra/dev/personal/web/hugo-coder/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 0.0.0.0)

(You might have problems to use the make command if you are using Window.)

@luochenxi
Copy link

luochenxi commented Apr 10, 2023

@luizdepra reappear process is as follows:

  • step 1:
    git clone https://github.com/luizdepra/hugo-coder
    git log d336b3cc3a65adafb5bcc436806fe22ce4117e94

  • step 2:
    cd hugo-coder; hugo server -D --themesDir=../.. --source=exampleSite --bind 0.0.0.0

  • show error:
    GET http://localhost:1313/site.webmanifest 404 (Not Found) site.webmanifest:1 Manifest: Line: 1, column: 1, Syntax error.

  • hugo version
    hugo v0.111.3+extended darwin/amd64 BuildDate=unknown

@luizdepra
Copy link
Owner

@luochenxi where this error appears? In the browser console or on the commandline output?

I don't remember adding the site.webmanifest file into Hugo-Coder. Is this something custom?

@luochenxi
Copy link

@luizdepra In the browser console. I did not make any changes, but simply reproduced the steps above.

image
image

open http://localhost:1313/

In the browser console :
image

@luizdepra
Copy link
Owner

@luochenxi, right. I tried reproducing the issue and I didn't get the error.

Try accessing the page with other browsers or using the incognito mode. It looks like an extension or something is trying to access the file.

As far as I know, the site.webmanifest is a file used to provide information from a PWA to the browser. See here. So, doesn't make sense to Hugo Coder have it.

@cep21
Copy link

cep21 commented Feb 2, 2024

So, doesn't make sense to Hugo Coder have it.

You reference the site.webmanifest here. Since it does not make sense for Hugo Coder to have it, should you remove that line from custom-icons.html in layouts?

@cep21 cep21 mentioned this issue Feb 2, 2024
1 task
@micchickenburger
Copy link

micchickenburger commented Mar 12, 2024

There are a few lines in this file that make assumptions about existing content. Some kind of settings should be checked before enabling these lines, else 404 errors are thrown in the browser console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants