google-docs-add-on icon indicating copy to clipboard operation
google-docs-add-on copied to clipboard

Trouble with Images and custom post types

Open Saramotive opened this issue 7 years ago • 4 comments

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!

Saramotive avatar Jan 23 '18 22:01 Saramotive

Hi @Saramotive! That image error may be because of something weird with the image in the document. Would it be possible for you to share the Google Doc with me so I can take a look? My email address is [email protected]

For uploading as a different post type, some plugins may require fields that we are not sending. If this is the case, you may want to try to upload as a post, then use a post type switching plugin to make it the type that you want.

georgeh avatar Jan 24 '18 14:01 georgeh

Update: This problem was occurring on a multi-site setup. I turned off "Network Activate" and am now able to upload images! The custom post type issue still exists.

Saramotive avatar Jan 30 '18 04:01 Saramotive

@Saramotive I'm having the same error you were having. What did you do to turn off "Network Activate" as you said?

teradyl avatar Apr 24 '18 16:04 teradyl

@teradyl I deactivated the plugin on the multi-site network and then activated it only on the specific sub-site where I wanted to use it (so it is not active network-wide). This will only make sense if you're on a multi-site setup!

Saramotive avatar Apr 24 '18 16:04 Saramotive