-
Notifications
You must be signed in to change notification settings - Fork 25
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
Static generation does not render some breadcrumb segments #174
Comments
This is still an issue for us. This issue seems to happen on some collections, but not others, and is happening more often. We don't see any errors in the SSG output, and have updated Statamic to 5.31.0 and SSG to 3.0.2. Additionally, running ssg locally on my machine produces no breadcrumbs at all. |
Hmm, I pulled down your repo and was able to generate breadcrumbs locally on your site fine 🤔 That said, I'm on PHP 8.3. I suspect it may have more to do with how you're configuring your .env and deploying your /docs. For example, I was getting 404s on nested pages until I tweaked
Which I had to change to:
I'm curious to know more about what you have set for that in your .env locally, versus where you're running ssg:generate for production?
If you take a collection or page that doesn't render properly, does it consistently not work across multiple generations? Or is there a randomness to when it does or doesn't work, on a specific page? |
Thanks for the response @jesseleite! I was able to reproduce your results locally, which is awesome. I think I had included I tried to replicate this setting in Vercel for our production build, |
@markzegarelli Hmm, assuming everything is working as expected locally, I'd need to know more details on your vercel env/config. I can try playing with a vercel deployment next week as well. |
Sure, here's the build script. Let me know what other details will be helpful for you. |
Hi @jesseleite, I hope you had a nice holiday period. I was poking around with this a bit more today, and noticed that on Vercel, their system environment variables don't include the protocol. However, when I set my I don't know if this could actually cause the issue, but it's a difference I noticed between my dev environment and prod. Edit: I tried using the Vercel provided URL, but that didn't help. As for the collection variability, it's consistent across generations. For example, this page has complete breadcrumbs (collection), whereas this page at the same level, but in a different collection, doesn't. |
Hey @markzegarelli, I apologize for the delay here...
Good to know! Also, how are you managing to even get a successful build/deployment in the first place? I'm realizing that our suggested build script is obviously out of date, can't get Vercel to build at all here... |
@jesseleite I'm using Node 18 for this project, which Vercel says uses the legacy build image. My guess is that was the default when the instructions were written. The build image for Node 20 or 22 uses the Amazon Linux 2023 repository, which doesn't include |
@markzegarelli Oh wow, okay I'm able to reproduce the issue locally now. It all depends on cache/stache state when running We're not sure this is a problem with the ssg, but possibly a bug in core. Will leave this open for now, but in the meantime you should be able to workaround this by adding
Also that clears things up regarding that error, thank you. We'll look into updating our instructions for the newer vercel build image! |
Amazing! Thanks @jesseleite! Fwiw, I did get an error in the build related to the spinner that displays in the terminal while the stache is warming, but it did not impact the output. |
Oh interesting. Does running with |
👍 Yup! That cleaned everything up. Thanks again! |
We're using SSG for the production deployment of our site, and working locally in the standard, non-static mode.
I've noticed there are sections of our site in which the last part of breadcrumb doesn't render. Example here. Production builds run on Vercel, following the instructions in your docs.
The same page running locally displays the breadcrumb as expected.
The text was updated successfully, but these errors were encountered: