ThemeBuilder
ThemeBuilder

Reputation: 1

Always getting "Invalid theme HTML" when submitting a theme on Tumblr

Is anyone else having trouble submitting themes to Tumblr? I have had this problem for two weeks now.

Whatever I try in the "Source code" field here https://www.tumblr.com/themes/new comes back as "Invalid theme HTML".

I have even tried the example markup here https://www.tumblr.com/docs/en/custom_themes and that still returns as "Invalid theme HTML".

Is there something wrong with the service at the moment? Do I need to use a particular combination of browser / OS?! I have tried with Chrome and IE11 on Windows.

I have contacted Support and they have replied asking me to send them a screenshot.

Upvotes: 0

Views: 4428

Answers (4)

9999years
9999years

Reputation: 1653

There’s a number of things that can cause your theme to get rejected, and unfortunately there’s no error message other than “you messed something up” so it’s not always easy to figure out the error.

Here’s some things to try:

  1. The doctype has to be <!DOCTYPE html>, even though Tumblr always inserts a doctype anyways.
  2. Your theme must have html, head, and body tags, even though they’re usually optional. Tumblr uses </head> to place the OpenGraph / Twitter card meta tags, for one.
  3. Check that you have the variables listed in MachineElf’s answer (expanded here into how you’d actually use them because just putting e.g. {RSS} in your theme bare would be invalid).

Example HTML including these things:

<!DOCTYPE html>
<html>
<head>
<link rel="alternate" type="application/rss+xml" href="{RSS}">
<link rel="shortcut icon" href="{Favicon}">
{block:Description}
    <meta name="description" content="{MetaDescription}">
{/block:Description}
<style>
    {CustomCSS}
</style>
</head>
<body>
{block:Posts}
    {block:Photo}
        <img src="{PhotoURL-HighRes}" alt="{PhotoAlt}">
    {/block:Photo}
{/block:Posts}
</body>
</html>

Upvotes: 0

Dax Kerchner
Dax Kerchner

Reputation: 11

I tried all kinds of things that didn't work. But it so happened that I'd just changed my email address and needed to verify it. Once I clicked the verification link, the invalid theme HTML error went away.

So I suppose if you see this error, it might be as bizarre and unrelated as that.

Upvotes: 1

MachineElf
MachineElf

Reputation: 1281

Make sure your theme contains the following tags:

<html>
<body>
{rss}
{favicon}
{customcss}
{metadescription}
{photoalt}

I had the same problem as I was missing {CustomCSS}

Upvotes: 0

fregante
fregante

Reputation: 31718

Whenever you encounter an issue like this:

  1. remove parts of the page until the uploader accepts it

When it finally accepts it:

  1. try to add back half of the part you just removed, until you pinpoint exactly what's wrong
  2. resolve/remove the invalid part
  3. add back the rest of the parts you removed.

If it doesn't accept anymore:

  1. go to step 1 and repeat until the problematic parts are gone.

Upvotes: 0

Related Questions