I get this error every time I use the built in wp apis. If I write my own handlers, everything works just fine. Am I doing something wrong?
ypeError: Cannot read property 'split' of undefined
at __webpack_exports__.default (webpack-internal:///./node_modules/@frontity/wp-source/src/libraries/handlers/utils/capitalize.ts:2:73)
at Object.eval (webpack-internal:///./node_modules/@frontity/wp-source/src/libraries/handlers/taxonomy.ts:9:300)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at eval (webpack-internal:///./node_modules/@frontity/wp-source/src/actions.ts:12:100)
Could you share the URL of the wordpress rest api that you’re using so that I can verify it with a clean frontity project or test your API with the codesandbox or a clean frontity project using npx frontity create capitalizeError?
Hi - no, not yet. It’s any of the postType calls. Here’s the trace:
post
actions.ts?f1c8:56 TypeError: Cannot read property 'split' of undefined
at __webpack_exports__.default (capitalize.ts?adee:3)
at Object.eval (postType.ts?e855:50)
at Generator.next (<anonymous>)
at asyncGeneratorStep (postType.ts:3)
at _next (postType.ts:3)
at eval (scheduler.js?f1c4:10)
at batchedUpdates$1 (react-dom.development.js?61bb:24386)
at batch (scheduler.js?f1c4:10)
at batched (scheduler.js?f1c4:25)
Here’s the route: frontity.actions.source.fetch("/stories/harvest-2019/")
All seems to work just fine. Just hits a npe on that capitalize call. I’ve been overriding the handlers and that seems to work fine, but a bit of a pain.
@mayer.georgep In order to give you more effective support, It would be really helpful if you could provide us with a way to reproduce and/or debug the problem you’re facing