Room 208

Elaborate Burn

Posts from February 2015

Changing post types and the new dashboard

As you probably well know by now, Tumblr rolled out a new dashboard design towards the end of last month. The new design no longer has any standard HTML forms, instead moving to Backbone.js, and thus the method for changing post types outlined in my previous guide no longer works. I spent about an hour today poking around to see if I could find an easy way to update the Backbone.js model and save it to the server, but alas, all that minified JavaScript proved too much for me. There still is at least one difficult way to do this, however.


First, open up the post edit page in your favorite web inspector, and head over to the network traffic pane. Make sure it’s recording requests and responses. In Chrome, for instance, look for the bright red “record” circle in the top left corner – if it’s grayed out, click it to start recording.

Now, go back to the edit page itself and click the Save button without making any changes. Return to the inspector and look for a request made to https://www.tumblr.com/svc/post/update.

Open it up and copy the request body, which should be a JSON object. This is a bit hard to find in Chrome; you’ll need to go to the Headers tab and click View source next to Request Payload to get what you’re looking for.

Head to the console and paste what you’ve just copied. Locate the field named post[type] and change its value as before. In the figure, I’m changing the post type from quote to text, and assigning the whole object to a new variable called alteredJSONData for convenience.

Now we’ll use the page’s jQuery object to make our altered request in the console, while still maintaining the security headers Tumblr uses:

jQuery.ajax("/svc/post/update", {
    data: JSON.stringify(alteredJSONData),
    type: "POST",
    contentType: "application/json",
    dataType: "json",
    processData: false
});

You’ll get a response object back if the request was successfully made.

Now reload the dashboard and the post in question should appear with its type changed. It’s a hack, but it works.


Updated March 19, 2015 to add screenshots.

@adamrobezzoli writes:

I saw your post (“Changing the type of an existing Tumblr post”)—that’s a great tip. Thanks for sharing! Do you know if something like this might be possible for changing the author of a post in a group tumblr?

Glad to help!

As far as I’m aware, there’s no way to do this. Allowing author changes incautiously could cause real problems – a malicious user could make someone else the author of an unflattering post, or take authorship of a good one. It’s also possible that Tumblr’s code assumes that the currently logged-in user is the one posting in enough places to make implementing author changes a headache. Arguably, if you’re a blog admin, you should still have the power to change authorship among the members of that blog, but until Tumblr explicitly announces such a feature, don’t hold your breath.