Q1 2023 - Version 1.3.0
This primarily a maintenance and bug fix release centered around updating Next to 13.1, and WordPress to version 6.1.
New Features
Super Editor User Role
We’ve added a new “Super Editor” user role in WordPress which can be helpful for giving someone full editing privileges, without the ability to customize permalinks, or add plugins. Either of those tend to have frustrating results on headless WP sites.
Manual Changes
Next 13 and Node 18
With these new versions, there are several things you’ll need to manually update:
- Update
.nvmrc
and yourpackage.json
engines.node
variables to Node 18. - the Link component no longer likes
<a>
children. See this article, and run the codemod. - the Image component has been rewritten. In our main repo we’ve updated to the new format, but upgrades might benefit from sticking with the legacy images (there is a codemod) — see the next docs.
- You may see local dev hydration errors as documented here.These are related to React 18.
Update functions.php and point to dashboard-customize.php
We’ve renamed dashboard-preview.php to dashboard-customize.php to better reflect what the file is doing. This file has a few bug-fixes to better take editors to their site, and allows for a docs_link to be defined in version control (in functions.php) should you want to link up external documentation.
ContentNode check
Previously, we would every request as if it were a contentNode. When it was a different type (for example a termNode for a taxonomy), we’d get a 500 error, which would trigger graphql notifications with Stellate.
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. It will require a manual patch to your [[..slug.js]]
https://github.com/patronage/bubs-next/pull/256/files
Renaming Wordpress ENV Variables
While not required, we recommend updating the syntax of your lib/constants file to allow for NEXT_PUBLIC_
prefixed variables, and to update yours. This fixes bugs in client-side components that need them, namely preview mode, but also future components that will fetch data client side.
What's Changed
- Db export task, use env vars by @ccorda in #232
- feat: super editor role that allows for safe permissions in headless wp by @ccorda in #233
- using our new db script, updating docs and tasks to use by @ccorda in #237
- in local dev, grab image from remote host if not found locally by @ccorda in #247
- Wp 6.1 by @ccorda in #252
- switch wpe target from master to main by @ccorda in #254
- don't restart docker containers by @ccorda in #257
- 404 check before trying to grab the current file by @ccorda in #260
- feat: NPM/Yarn Dependency Pinning by @kylehotchkiss in #259
- chore: wpgraphql.php cleaned up/updated with helpful examples by @kylehotchkiss in #262
- refactor: don't duplicate data in props by @ccorda in #258
- feat: default robots.txt for wordpress by @ccorda in #263
- chore: Update to Node 18, Next 13, remove , fix lingering eslint issues by @kylehotchkiss in #261
- fix: use public versions of wp env vars by @ccorda in #253
- fix: upstream dashbaord customizations so title is preserved by @ccorda in #272
- fix: nodeByUri/graphcdn fix by @kylehotchkiss in #256
Full Changelog: v1.2.0...v1.3.0