Automattic / Automattic/google-docs-add-on
Trouble with Images and custom post types
- Dominant language
- JavaScript
- Stars
- 169
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I have gotten our wordpress.org website to connect to Jetpack, but when I upload posts two problems occur.
The first is that the images don't upload. The error I get is the following:
`{"message":"Request failed for https://public-api.wordpress.com/rest/v1.1/sites/131112556/media/new returned code 400. Truncated server response: {\"error\":\"unknown\",\"message\":\"Unknown error communicating with the Jetpack site\"} (use muteHttpExceptions option to examine full response)","name":"Exception","fileName":"Code (WordPress.com for Google Docs)","lineNumber":3350,"stack":"\tat Code (WordPress.com for Google Docs):3350 (request)\n\tat Code (WordPress.com for Google Docs):3423 (uploadImage)\n\tat Code (WordPress.com for Google Docs):305 (upload)\n\tat Code (WordPress.com for Google Docs):4084\n\tat Code (WordPress.com for Google Docs):3879 (renderInlineImage)\n\tat Code (WordPress.com for Google Docs):3543 (renderElement)\n\tat Code (WordPress.com for Google Docs):3525 (renderContainer)\n\tat Code (WordPress.com for Google Docs):3656 (renderParagraph)\n\tat Code (WordPress.com for Google Docs):3539 (renderElement)\n\tat Code (WordPress.com for Google Docs):3525 (renderContainer)\n\tat Code (WordPress.com for Google Docs):310 (postToWordPress)\n"}`
Also, if I attempt to upload as anything other than a regular post, I get a simple error:
"unknown post"
Any thoughts on how to fix these issues?
Thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the image upload failure at the WordPress.com REST endpoint and trace the reported uploadImage and postToWordPress entry points in the Google Apps Script. Investigate the separate “unknown post” response for custom post types; done means images upload successfully and non-standard post types publish without either error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, wordpress
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100