bastibe / org-static-blog

A static site generator using org-mode
BSD 3-Clause "New" or "Revised" License
341 stars 74 forks source link

Backend unset or broken: `org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export` #114

Closed anoduck closed 2 years ago

anoduck commented 2 years ago

Went to publish my newly generated site, and received the error: org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export.

  signal(error ("Unknown \"nil\" back-end: Aborting export"))
  error("Unknown \"%s\" back-end: Aborting export" nil)
  org-export-barf-if-invalid-backend(nil)
  org-export-as(org-static-blog-post-bare nil nil nil nil)
  org-static-blog-render-post-content("~/User/Site/posts/2022-11-03-fir...")
  org-static-blog-publish-file("~/User/Site/posts/2022-11-03-fir...")
  org-static-blog-publish(nil)
  funcall-interactively(org-static-blog-publish nil)
  call-interactively(org-static-blog-publish record nil)
  command-execute(org-static-blog-publish record)
  execute-extended-command(nil "org-static-blog-publish" nil)
  funcall-interactively(execute-extended-command nil "org-static-blog-publish" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

Is there some crucial step that I missed?

bastibe commented 2 years ago

I seem to remember seeing errors such as this if some funky formatting is present in the org-file that can't be exported as HTML. Perhaps a custom org-block that doesn't have a registered exporter? Could also be some broken unicode characters or something like that.

anoduck commented 2 years ago

@bastibe You are officially cool, because you used the word "funky" to technically describe a computational phenomenon. You speak my language.

That appears to be the issue, one of the posts created includes source code blocks for python and org-mode itself. The rendering of an org-mode source code block nested within an org-mode file to HTML probably triggered the error. Kind of just like, googling "google", can destroy the internet. :)

I just tested rendering using a simple post, and it worked without a hitch. So, I will return to the post in question and see if I can clean it up enough to allow rendering.

Thanks for the help.

bastibe commented 2 years ago

That's right! Now that you mention it, if you type org into org, you can break your blog. No idea why, but I've seen this before.

anoduck commented 2 years ago

Removed the problematic post, and it turned out the entire site like churning butter.

It was either the "org src block inside org", or my use of the markdown tag "`" to denote a blob of source.