BenWard / tumblr2wordpress

A single-page PHP script to export all public posts from a Tumblr account and export them as Wordpress extended RSS. (Enhancement fork of Hao Chen's Tumblr2Wordpress.)
http://tumblr2wordpress.benapps.net/
62 stars 18 forks source link

Tumblr post_id's have exceeded PHP's 32-bit integer maximum #12

Closed mynameiswilson closed 13 years ago

mynameiswilson commented 13 years ago

As of mid-December, Tumblr's post ID has exceeded PHP's 32-bit integer maximum. Not necessarily Tumblr2Wordpress' issue, but rather the Wordpress Importer's problem. (I've posted a note over there: http://wordpress.org/support/topic/plugin-wordpress-importer-importer-fails-for-post_ids-over-php_int_max-of-2147483647?replies=1#post-1943626)

The Wordpress Importer plugin attempts to forcibly convert (using (int)) the post_id into an integer, which, beyond PHP_INT_MAX always returns 2147483647.

Mayhem ensures.

Wordpress Importer is definitely in the wrong here, but until that is fixed (or you are running T2W on a 64-bit system), you are going to have problems. Perhaps an option in T2W to set the post_id to start from 1 and increment? Rewriting would suffer a bit, but ah well...

BenWard commented 13 years ago

Thanks for the report. This reached me be email as well. The ID isn't needed for rewriting purposes—that can be handled in the GUID and slug fields instead—so it seems the field can just be left out and WordPress will generate a new one itself, safely within Int32. This is probably saner in itself, just in case a Tumblr ID somehow conflicted with an existing WordPress ID anyway.