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

Error for all internal tags #35

Open
bmann opened this issue Oct 6, 2020 · 7 comments
Open

Error for all internal tags #35

bmann opened this issue Oct 6, 2020 · 7 comments

Comments

@bmann
Copy link

bmann commented Oct 6, 2020

Errors on the source site that result in 404s all attempt to write to dist/404.html which itself causes the build to fail and nothing to get written.

I tracked this down to using internal tags. Since I only had 4 and wasn't really using them, I deleted them. I guess check for internal tags and skip them?

@daviddarnes
Copy link
Contributor

Hmm, seems strange, would you be able to go into more detail? We don't really want to be skipping internal tags since they are very useful for creating custom collections in Eleventy

@bmann
Copy link
Author

bmann commented Oct 6, 2020

The links to /tag/hashtag-(someinternaltag) throw 404s on our live site, so when Eleventy went to fetch them it followed the redirect and wrote to the 404 file.

I didn’t change anything with Ghost so I just assumed that the internal tags aren’t publicly browseable. I assume by design, since you don’t really want to expose potentially private metadata like “don’t show this bad post” or whatever.

@daviddarnes
Copy link
Contributor

Im a bit confused, are you linking to those internal tag pages? Sounds to me like Eleventy is just doing as expected and showing a 404 page on pages that shouldn't exist

@bmann
Copy link
Author

bmann commented Oct 7, 2020

I am not linking to them, this is the default behaviour with this starter out of the box.

When I did a build, it generates all the /tag/tagname pages. Since the internal tags all show a 404, Eleventy gives me an error that multiple pages have the same /dist/404.html permalink and fails to build.

Steps to reproduce would be, make a ghost site with at least one internal tag.

daviddarnes added a commit to daviddarnes/eleventy-starter-ghost that referenced this issue Nov 12, 2020
@daviddarnes
Copy link
Contributor

@bmann I've proposed a fix which will remove internal tags from the tags collection. Internal tags will still be an attribute on posts, but filtered out when tag pages are created

@bmann
Copy link
Author

bmann commented Nov 13, 2020

Yeah that’s ideal. Thank you!

@danielclough
Copy link

I seem to be having a very similar problem.

I'm not 100% sure how to confirm this error is coming from the same underlying issue - or go about fixing it.
But it seems related, sorry if I should have opened a new issue?


I am using many collections, but no internal tags for pages - instead I am filtering by author for my page collections.

  config.addCollection("jaPages", async function(collection) {
    collection = await api.pagesaz
      .browse({
        include: "authors",
        limit: "all",
        filter: "author:ja"
      })

and hash-tags for posts

 config.addCollection("enJournal", async function(collection) {
    collection = await api.posts
      .browse({
        include: "tags,authors",
        limit: "all",
        filter: "author:en+tag:-hash-epp+tag:-hash-shop+tag:-hash-video"
      })

Deploys stopped working suddenly on Netlify yesterday for:

12:17:46 AM: > Output conflict: multiple input files are writing to `dist/404.html`. Use distinct `permalink` values to resolve this conflict.
12:17:46 AM:   1. ./src/404.njk
12:17:46 AM:   2. ./src/404.njk

image

I did try starting with a fresh clone of eleventy-starter-ghost and adding the commit mentioned above, but that didn't seem to change anything in development.

I could delete all internal tags and reorganize, but since there is this open issue I thought first I should ask for advice.
Any suggestions about how to proceed would be appreciated.
Thank you.

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

No branches or pull requests

3 participants