org2blog / org2blog

Blog from Org mode to WordPress.

Home Page:https://github.com/org2blog/org2blog/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getting 400 on post not sure why

kevzettler opened this issue · comments

Description

I'm getting what appears to be a http 400 error when trying to save a post using org2blog. I am trying to save a subtree using org2blog-user-interface u I have other subtrees in this org file that save succesfully.

Error (org2blog/wp): I’m sorry I ran into a problem on post: “The Epic Botch of Diablo 3 derp” (ID “nil”) inside of ‘org2blog-entry-save’.
Error (org2blog/wp): 2020-09-12T14:19:02-07:00
Please report that along with the following details:
(error Error during request: 400)
Org2Blog Runtime: Org2Blog 1.1.1, Emacs 26.3, Org Mode 9.1.9, MetaWeblog 1.1.1, XML-RPC 1.6.12

Prerequisites

  • Did you study the README to learn how the feature you are reporting a bug is expected to work?
  • Did you go through the When Things Go Wrong process? It covers the steps to review many possibilies
  • Did you review the issue tracker to see if this bug is already
    reported or resolved?
  • Did you consider that what you are describing may be a feature request? If you answered yes, review both the issue tracker and the FUTURE file to see if the feature request already exists.

Environment

  • Regarding the feature that you are reporting: #1 Has it ever worked correctly for you? and #2 If so when, and, what do you think might have changed between then and now? For example you are on a different network or you made changes to your Emacs configuration.

yes there are other subtrees in the org file that save successfully

  • What operating system are you running Emacs on? [e.g., macOS 10.13 or Windows 10]
Darwin kevs-mbp.lan 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
  • How did you install Emacs? [e.g., compiled it, download and manual install, package manager like Apt on Linux or brew on macOS]

Emacs.APP osx package

  • Do you run Emacs in the GUI or a Terminal? [e.g., GUI or Terminal]
    GUI

  • What is the value of org2blog/wp-blog-alist? Here is how to add the value to this BR: Create an empty source block by inserting three backticks on a blank line, hit return to create a new empty line, then insert three backticks. Now the goal is to place the value on that empty line. One way is for you to copy your configuration into this block manually. It is the easiest. Another way is to ask Emacs to find the value so you can paste it onto this line. Here is how: hit M-S-:, type (kill-new (with-output-to-string (princ org2blog/wp-blog-alist))) and strike [enter], the information is now in the kill-ring, go back to that empty line, and paste the value. You will have to format it now, but you will have the correct values for your system. Either way, remove any private information like passwords or internal URLs. It will look something like this markup and code:'

(("radcade" :url "https://radcade.com/xmlrpc.php" :username "kevzettler" :password "")

Now obtain critical library information by:

  1. Hitting M-x
  2. Typing in org2blog-version-info
  3. Striking [enter]
  4. The information appears in the minibuffer then gets added to the kill-ring, aka your clipboard.
  5. Paste that message below:
Org2Blog Runtime: Org2Blog 1.1.1, Emacs 26.3, Org Mode 9.1.9, MetaWeblog 1.1.1, XML-RPC 1.6.12

Did you go through the org2blog-user-report process? If you did then please paste in the log files here [yes/No]:

Error (org2blog/wp): I’m sorry I ran into a problem on post: “The Epic Botch of Diablo 3 derp” (ID “nil”) inside of ‘org2blog-entry-save’.
Error (org2blog/wp): 2020-09-12T14:19:02-07:00
Please report that along with the following details:
(error Error during request: 400)
Org2Blog Runtime: Org2Blog 1.1.1, Emacs 26.3, Org Mode 9.1.9, MetaWeblog 1.1.1, XML-RPC 1.6.12

Server

  • What is the URL of your blog?
    www.radcade.com
  • Do you have a web browser to use for testing?
    yes
  • Can you reach that URL using that browser?
    yes
  • Can you log into your blog using that browser?
    yes
  • Can you create or edit a post using that browser?
    yes

Hardware Issues

It is easy to diagnose odd computer and router behavior and that might have been reported to address issues working with WordPress's XML-RPC. However for most of us rebooting the server is neither trivial nor easy and in fact can be a very bad idea. Only consider that route if you know what you are doing.

  • Have you tried rebooting your computer?
    yes
  • Have you tried rebooting your router?
    yes
  • Have you tried rebooting your server?
    yes

Minimal Reproducible Example

Read about creating a Minimal Reproducible Example to learn about the best way to write a BR. Although the post is tailored for their discussion board, the techniques and strategies apply perfectly to report a bug. After reading about their approach a couple of times, please move forward with the BR.

Additional context

I think the issue is related to media images in the post. I have tried deleting both the post and media from the wordpress instance and also recreating the post in the org file.

If I remove some content from the post and make it minimal text content it seems to save ok. Is there some kind of index file or cache file that I need to clear locally?

Hi @kevzettler Thank you for filling out the report. What do you think about sending me a copy of your post and your image so I can try posting in on my blog to see what happens? My email is on my About page.

@kevzettler How did posting end up going?

@grettke sorry I do not remember I think I ended up recreating the post from scratch