Closed kylehotchkiss closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
bubs-next | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Mar 11, 2023 at 11:29PM (UTC) |
Correcting myself, it's not our api routes (/sitemap.xml and /feed) work fine. But anything random, like /foo
.
I get this in ..slug
TypeError: Cannot read properties of null (reading 'isContentNode')
This error happened while generating the page. Any console logs will be displayed in the terminal window.
This resolves a steady issue causing graphcdn to email us a generic error occurring across a variety of projects.
In #229 we narrowed down that issue to Wordpress supported but not bubs-next supported pathnames for taxonomies. To solve, this PR adds an additional check inside of getStaticContent which verifies that a pathname is actually a contentNode before we try querying contentNode for that path. The function can tell us whether a URL is a contentNode (which we always render), a termNode (we don't render) or neither (for example, a redirect or an actual 404).
This nice thing about this solve instead of hardrcoding a set of taxonomies which is going to change across different projects, we can actually check the source of truth on project taxonomies (which is Wordpress)
An example of this fix in practice: In production, a 500 error: https://www.nextgenpolicy.org/category/advisory/ In the preview branch with this fix, a 404 http://nextgenpolicy-by91aal7d-patronage.vercel.app/category/advisory/
TODO:
sitemap
,feed
.