fabacab / tumblr-crosspostr

:left_right_arrow: Tumblr Crosspostr is a bi-directional WordPress and Tumblr bridge inspired by Tumblrize.
https://wordpress.org/plugins/tumblr-crosspostr/
9 stars 3 forks source link

401 Not Authorized (after 0.7.10 update) #8

Closed santsys closed 10 years ago

santsys commented 10 years ago

After i upgraded to 0.7.10 version of Crosspostr i get 401 Not Authorized errors any time I try to update a post. I'm running WordPress 3.8.2.

When I initially received the error i deactivated and reactivated, then i created a new application on Tumblr, all with the same result. 401 Not Authorized.

error-01

fabacab commented 10 years ago

Does this error still occur for you when using 74f66edc38a144804fc190543afbe69b7f5b4cd1 (release 0.7.11)? I ask because this release fixes a similar issue and I'm curious to know if the two are related.

If this does occur, can you please try "enabling detailed debugging information" and sending me a copy of your debug.log file? Thanks.

santsys commented 10 years ago

I just updated to 0.7.11 and I get the same error.

Here is what is output on the page (same 401 not authorized).

object(stdClass)#352 (2) {
  ["meta"]=>
  object(stdClass)#349 (2) {
    ["status"]=>
    int(401)
    ["msg"]=>
    string(14) "Not Authorized"
  }
  ["response"]=>
  array(0) {
  }
}

Here is the information from the log file (I removed my consumer key, oauth token and oauth signature).

[11-Apr-2014 23:55:46] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[11-Apr-2014 23:55:46] Connecting to api.tumblr.com
[11-Apr-2014 23:55:46] Resolving HTTP server domain "api.tumblr.com"...
[11-Apr-2014 23:55:46] Connecting to HTTP server IP 66.6.40.36 port 80...
[11-Apr-2014 23:55:46] Connected to api.tumblr.com
[11-Apr-2014 23:55:46] C GET /v2/user/info HTTP/1.1
[11-Apr-2014 23:55:46] C Host: api.tumblr.com
[11-Apr-2014 23:55:46] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[11-Apr-2014 23:55:46] C Accept: */*
[11-Apr-2014 23:55:46] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="cd63e72f97de9c6e1491e84dd2a1d688",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397260546",oauth_version="1.0",oauth_token="AUTH_TOKEN",oauth_signature="bNRfnTVPaDboRIGK%2B6GlL3TbQ4I%3D"
[11-Apr-2014 23:55:46] C Connection: Keep-Alive
[11-Apr-2014 23:55:46] C 
[11-Apr-2014 23:55:46] S HTTP/1.1 200 OK
[11-Apr-2014 23:55:46] S Server: nginx
[11-Apr-2014 23:55:46] S Date: Fri, 11 Apr 2014 23:55:46 GMT
[11-Apr-2014 23:55:46] S Content-Type: application/json; charset=utf-8
[11-Apr-2014 23:55:46] S Transfer-Encoding: chunked
[11-Apr-2014 23:55:46] S Connection: close
[11-Apr-2014 23:55:46] S Vary: Accept-Encoding
[11-Apr-2014 23:55:46] S Set-Cookie: tmgioct=534881023c89850151934990; expires=Mon, 08-Apr-2024 23:55:46 GMT; path=/; httponly
[11-Apr-2014 23:55:46] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[11-Apr-2014 23:55:46] S X-UA-Compatible: IE=Edge,chrome=1
[11-Apr-2014 23:55:46] S 
[11-Apr-2014 23:55:46] S 1db
[11-Apr-2014 23:55:46] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397245106,"posts":48,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[11-Apr-2014 23:55:46] S 0
[11-Apr-2014 23:55:46] S 
[11-Apr-2014 23:55:46] Disconnected from api.tumblr.com
[11-Apr-2014 23:55:50] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[11-Apr-2014 23:55:50] Connecting to api.tumblr.com
[11-Apr-2014 23:55:50] Resolving HTTP server domain "api.tumblr.com"...
[11-Apr-2014 23:55:50] Connecting to HTTP server IP 66.6.40.36 port 80...
[11-Apr-2014 23:55:50] Connected to api.tumblr.com
[11-Apr-2014 23:55:50] C GET /v2/user/info HTTP/1.1
[11-Apr-2014 23:55:50] C Host: api.tumblr.com
[11-Apr-2014 23:55:50] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[11-Apr-2014 23:55:50] C Accept: */*
[11-Apr-2014 23:55:50] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="74595f2d9c130393c28f30b9a83b68dc",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397260550",oauth_version="1.0",oauth_token="AUTH_TOKEN",oauth_signature="AUTH_SIGNATURE"
[11-Apr-2014 23:55:50] C Connection: Keep-Alive
[11-Apr-2014 23:55:50] C 
[11-Apr-2014 23:55:51] S HTTP/1.1 200 OK
[11-Apr-2014 23:55:51] S Server: nginx
[11-Apr-2014 23:55:51] S Date: Fri, 11 Apr 2014 23:55:51 GMT
[11-Apr-2014 23:55:51] S Content-Type: application/json; charset=utf-8
[11-Apr-2014 23:55:51] S Transfer-Encoding: chunked
[11-Apr-2014 23:55:51] S Connection: close
[11-Apr-2014 23:55:51] S Vary: Accept-Encoding
[11-Apr-2014 23:55:51] S Set-Cookie: tmgioct=53488106eeef080028376340; expires=Mon, 08-Apr-2024 23:55:50 GMT; path=/; httponly
[11-Apr-2014 23:55:51] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[11-Apr-2014 23:55:51] S X-UA-Compatible: IE=Edge,chrome=1
[11-Apr-2014 23:55:51] S 
[11-Apr-2014 23:55:51] S 1db
[11-Apr-2014 23:55:51] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397245106,"posts":48,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[11-Apr-2014 23:55:51] S 0
[11-Apr-2014 23:55:51] S 
[11-Apr-2014 23:55:51] Disconnected from api.tumblr.com
[11-Apr-2014 23:55:51] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[11-Apr-2014 23:55:51] Connecting to api.tumblr.com
[11-Apr-2014 23:55:51] Resolving HTTP server domain "api.tumblr.com"...
[11-Apr-2014 23:55:51] Connecting to HTTP server IP 66.6.40.36 port 80...
[11-Apr-2014 23:55:51] Connected to api.tumblr.com
[11-Apr-2014 23:55:51] C GET /v2/user/info HTTP/1.1
[11-Apr-2014 23:55:51] C Host: api.tumblr.com
[11-Apr-2014 23:55:51] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[11-Apr-2014 23:55:51] C Accept: */*
[11-Apr-2014 23:55:51] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="909ec2ad1eebe120d8747c800b3cb0c1",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397260551",oauth_version="1.0",oauth_token="AUTH_TOKEN",oauth_signature="WqpdcyAz7tnRmhUJeZzi3OV9TD0%3D"
[11-Apr-2014 23:55:51] C Connection: Keep-Alive
[11-Apr-2014 23:55:51] C 
[11-Apr-2014 23:55:51] S HTTP/1.1 200 OK
[11-Apr-2014 23:55:51] S Server: nginx
[11-Apr-2014 23:55:51] S Date: Fri, 11 Apr 2014 23:55:51 GMT
[11-Apr-2014 23:55:51] S Content-Type: application/json; charset=utf-8
[11-Apr-2014 23:55:51] S Transfer-Encoding: chunked
[11-Apr-2014 23:55:51] S Connection: close
[11-Apr-2014 23:55:51] S Vary: Accept-Encoding
[11-Apr-2014 23:55:51] S Set-Cookie: tmgioct=5348810790b3220203183770; expires=Mon, 08-Apr-2024 23:55:51 GMT; path=/; httponly
[11-Apr-2014 23:55:51] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[11-Apr-2014 23:55:51] S X-UA-Compatible: IE=Edge,chrome=1
[11-Apr-2014 23:55:51] S 
[11-Apr-2014 23:55:51] S 1db
[11-Apr-2014 23:55:51] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397245106,"posts":48,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[11-Apr-2014 23:55:51] S 0
[11-Apr-2014 23:55:51] S 
[11-Apr-2014 23:55:51] Disconnected from api.tumblr.com
[11-Apr-2014 23:55:54] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[11-Apr-2014 23:55:54] Connecting to api.tumblr.com
[11-Apr-2014 23:55:54] Resolving HTTP server domain "api.tumblr.com"...
[11-Apr-2014 23:55:54] Connecting to HTTP server IP 66.6.40.36 port 80...
[11-Apr-2014 23:55:54] Connected to api.tumblr.com
[11-Apr-2014 23:55:54] C GET /v2/user/info HTTP/1.1
[11-Apr-2014 23:55:54] C Host: api.tumblr.com
[11-Apr-2014 23:55:54] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[11-Apr-2014 23:55:54] C Accept: */*
[11-Apr-2014 23:55:54] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="e093c30d6080b24019c7279eaff278c7",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397260554",oauth_version="1.0",oauth_token="AUTH_TOKEN",oauth_signature="dy%2FJcAp4WPJq05DQQPuQqSM3kn4%3D"
[11-Apr-2014 23:55:54] C Connection: Keep-Alive
[11-Apr-2014 23:55:54] C 
[11-Apr-2014 23:55:54] S HTTP/1.1 200 OK
[11-Apr-2014 23:55:54] S Server: nginx
[11-Apr-2014 23:55:54] S Date: Fri, 11 Apr 2014 23:55:54 GMT
[11-Apr-2014 23:55:54] S Content-Type: application/json; charset=utf-8
[11-Apr-2014 23:55:54] S Transfer-Encoding: chunked
[11-Apr-2014 23:55:54] S Connection: close
[11-Apr-2014 23:55:54] S Vary: Accept-Encoding
[11-Apr-2014 23:55:54] S Set-Cookie: tmgioct=5348810a4950960011553840; expires=Mon, 08-Apr-2024 23:55:54 GMT; path=/; httponly
[11-Apr-2014 23:55:54] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[11-Apr-2014 23:55:54] S X-UA-Compatible: IE=Edge,chrome=1
[11-Apr-2014 23:55:54] S 
[11-Apr-2014 23:55:54] S 1db
[11-Apr-2014 23:55:54] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397245106,"posts":48,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[11-Apr-2014 23:55:54] S 0
[11-Apr-2014 23:55:54] S 
[11-Apr-2014 23:55:54] Disconnected from api.tumblr.com
[11-Apr-2014 23:55:54] OAuth client: Accessing the API call at http://api.tumblr.com/v2/blog/santsys.tumblr.com/post/edit
[11-Apr-2014 23:55:54] Connecting to api.tumblr.com
[11-Apr-2014 23:55:54] Resolving HTTP server domain "api.tumblr.com"...
[11-Apr-2014 23:55:54] Connecting to HTTP server IP 66.6.40.36 port 80...
[11-Apr-2014 23:55:54] Connected to api.tumblr.com
[11-Apr-2014 23:55:54] C POST /v2/blog/santsys.tumblr.com/post/edit HTTP/1.1
[11-Apr-2014 23:55:54] C Host: api.tumblr.com
[11-Apr-2014 23:55:54] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[11-Apr-2014 23:55:54] C Accept: */*
[11-Apr-2014 23:55:54] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="8ccb8639952ea0de25ce798f49d0025f",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397260554",oauth_version="1.0",oauth_token="AUTH_TOKEN",oauth_signature="1bUj86fmmx3SAUEdrkbEai6mVB0%3D"
[11-Apr-2014 23:55:54] C Connection: Keep-Alive
[11-Apr-2014 23:55:54] C Content-Type: application/x-www-form-urlencoded
[11-Apr-2014 23:55:54] C Content-Length: 1079
[11-Apr-2014 23:55:54] C 
[11-Apr-2014 23:55:54] C type=text&state=published&tags=Digital+Caliper%2CTools%2C&date=2014-04-11+03%3A07%3A20+GMT&format=html&slug=neiko-tools-6-digital-caliper-01407a&source_url=http%3A%2F%2Fwww.santsys.com%2Fs2blog%2Fneiko-tools-6-digital-caliper-01407a%2F&title=Neiko+Tools+-+6%22+Digital+Caliper+%2801407A%29&body=%3Cp%3EI%26%238217%3Bve+been+in+need+of+my+own+set+of+digital+calipers+for+a+while+now%2C+so+I+decided+to+take+a+look+on+Amazon+and+see+what+options+I+had.+There+are+quite+a+few+options%26%238230%3B+The+Neiko+6+in.+caliper+was+a+%26%238220%3Bbest+seller%26%238221%3B+and+had+good+reviews.+And+for+%2417%2C+I+figured+I%26%238217%3Bd%26hellip%3B%3C%2Fp%3E%0A%3Cp+class%3D%22tumblr-crosspostr-linkback%22%3E%3Ca+href%3D%22http%3A%2F%2Fwww.santsys.com%2Fs2blog%2Fneiko-tools-6-digital-caliper-01407a%2F%22+title%3D%22Go+to+the+original+post.%22+rel%3D%22bookmark%22%3ENeiko+Tools+%26%238211%3B+6%26%238243%3B+Digital+Caliper+%2801407A%29%3C%2Fa%3E+was+originally+published+on+%3Ca+href%3D%22http%3A%2F%2Fwww.santsys.com%2Fs2blog%22%3ES%5E2+Blog%3C%2Fa%3E%3C%2Fp%3E&tweet=off&id=2147483647
[11-Apr-2014 23:55:54] S HTTP/1.1 401 Not Authorized
[11-Apr-2014 23:55:54] S Server: nginx
[11-Apr-2014 23:55:54] S Date: Fri, 11 Apr 2014 23:55:54 GMT
[11-Apr-2014 23:55:54] S Content-Type: application/json; charset=utf-8
[11-Apr-2014 23:55:54] S Transfer-Encoding: chunked
[11-Apr-2014 23:55:54] S Connection: close
[11-Apr-2014 23:55:54] S Set-Cookie: tmgioct=5348810ac24e050352459130; expires=Mon, 08-Apr-2024 23:55:54 GMT; path=/; httponly
[11-Apr-2014 23:55:54] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[11-Apr-2014 23:55:54] S 
[11-Apr-2014 23:55:54] S 3c
[11-Apr-2014 23:55:54] S {"meta":{"status":401,"msg":"Not Authorized"},"response":[]}
[11-Apr-2014 23:55:54] S 0
[11-Apr-2014 23:55:54] S 
[11-Apr-2014 23:55:54] Disconnected from api.tumblr.com
[11-Apr-2014 23:55:54] OAuth client: Could not retrieve the OAuth access token. Error: it was not possible to access the API call: it was returned an unexpected response status 401 Response: {"meta":{"status":401,"msg":"Not Authorized"},"response":[]}
[11-Apr-2014 23:55:58] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[11-Apr-2014 23:55:58] Connecting to api.tumblr.com
[11-Apr-2014 23:55:58] Resolving HTTP server domain "api.tumblr.com"...
[11-Apr-2014 23:55:58] Connecting to HTTP server IP 66.6.40.36 port 80...
[11-Apr-2014 23:55:58] Connected to api.tumblr.com
[11-Apr-2014 23:55:58] C GET /v2/user/info HTTP/1.1
[11-Apr-2014 23:55:58] C Host: api.tumblr.com
[11-Apr-2014 23:55:58] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[11-Apr-2014 23:55:58] C Accept: */*
[11-Apr-2014 23:55:58] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="a1ae88e58243a4e2d7cfa0a0530f890b",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397260558",oauth_version="1.0",oauth_token="AUTH_TOKEN",oauth_signature="ZxOHEHrScvSyou1OdulQe4Zp7dQ%3D"
[11-Apr-2014 23:55:58] C Connection: Keep-Alive
[11-Apr-2014 23:55:58] C 
[11-Apr-2014 23:55:58] S HTTP/1.1 200 OK
[11-Apr-2014 23:55:58] S Server: nginx
[11-Apr-2014 23:55:58] S Date: Fri, 11 Apr 2014 23:55:58 GMT
[11-Apr-2014 23:55:58] S Content-Type: application/json; charset=utf-8
[11-Apr-2014 23:55:58] S Transfer-Encoding: chunked
[11-Apr-2014 23:55:58] S Connection: close
[11-Apr-2014 23:55:58] S Vary: Accept-Encoding
[11-Apr-2014 23:55:58] S Set-Cookie: tmgioct=5348810e769cc20925932840; expires=Mon, 08-Apr-2024 23:55:58 GMT; path=/; httponly
[11-Apr-2014 23:55:58] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[11-Apr-2014 23:55:58] S X-UA-Compatible: IE=Edge,chrome=1
[11-Apr-2014 23:55:58] S 
[11-Apr-2014 23:55:58] S 1db
[11-Apr-2014 23:55:58] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397245106,"posts":48,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[11-Apr-2014 23:55:58] S 0
[11-Apr-2014 23:55:58] S 
[11-Apr-2014 23:55:58] Disconnected from api.tumblr.com
[11-Apr-2014 23:55:59] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[11-Apr-2014 23:55:59] Connecting to api.tumblr.com
[11-Apr-2014 23:55:59] Resolving HTTP server domain "api.tumblr.com"...
[11-Apr-2014 23:55:59] Connecting to HTTP server IP 66.6.40.36 port 80...
[11-Apr-2014 23:55:59] Connected to api.tumblr.com
[11-Apr-2014 23:55:59] C GET /v2/user/info HTTP/1.1
[11-Apr-2014 23:55:59] C Host: api.tumblr.com
[11-Apr-2014 23:55:59] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[11-Apr-2014 23:55:59] C Accept: */*
[11-Apr-2014 23:55:59] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="1db969e6b66c42a65494662bf74d9ba8",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397260559",oauth_version="1.0",oauth_token="AUTH_TOKEN",oauth_signature="ONY7FNPwvfy4KrwMT%2B1D6i53f5k%3D"
[11-Apr-2014 23:55:59] C Connection: Keep-Alive
[11-Apr-2014 23:55:59] C 
[11-Apr-2014 23:55:59] S HTTP/1.1 200 OK
[11-Apr-2014 23:55:59] S Server: nginx
[11-Apr-2014 23:55:59] S Date: Fri, 11 Apr 2014 23:55:59 GMT
[11-Apr-2014 23:55:59] S Content-Type: application/json; charset=utf-8
[11-Apr-2014 23:55:59] S Transfer-Encoding: chunked
[11-Apr-2014 23:55:59] S Connection: close
[11-Apr-2014 23:55:59] S Vary: Accept-Encoding
[11-Apr-2014 23:55:59] S Set-Cookie: tmgioct=5348810f3e63720241365310; expires=Mon, 08-Apr-2024 23:55:59 GMT; path=/; httponly
[11-Apr-2014 23:55:59] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[11-Apr-2014 23:55:59] S X-UA-Compatible: IE=Edge,chrome=1
[11-Apr-2014 23:55:59] S 
[11-Apr-2014 23:55:59] S 1db
[11-Apr-2014 23:55:59] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397245106,"posts":48,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[11-Apr-2014 23:55:59] S 0
[11-Apr-2014 23:55:59] S 
[11-Apr-2014 23:55:59] Disconnected from api.tumblr.com
[11-Apr-2014 23:55:59] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[11-Apr-2014 23:55:59] Connecting to api.tumblr.com
[11-Apr-2014 23:55:59] Resolving HTTP server domain "api.tumblr.com"...
[11-Apr-2014 23:55:59] Connecting to HTTP server IP 66.6.40.36 port 80...
[11-Apr-2014 23:55:59] Connected to api.tumblr.com
[11-Apr-2014 23:55:59] C GET /v2/user/info HTTP/1.1
[11-Apr-2014 23:55:59] C Host: api.tumblr.com
[11-Apr-2014 23:55:59] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[11-Apr-2014 23:55:59] C Accept: */*
[11-Apr-2014 23:55:59] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="758a01e05eba5404865914e7dc507c63",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397260559",oauth_version="1.0",oauth_token="AUTH_TOKEN",oauth_signature="NCc2AYHyiM%2Bn6MyMfN7KICrh2tc%3D"
[11-Apr-2014 23:55:59] C Connection: Keep-Alive
[11-Apr-2014 23:55:59] C 
[11-Apr-2014 23:55:59] S HTTP/1.1 200 OK
[11-Apr-2014 23:55:59] S Server: nginx
[11-Apr-2014 23:55:59] S Date: Fri, 11 Apr 2014 23:55:59 GMT
[11-Apr-2014 23:55:59] S Content-Type: application/json; charset=utf-8
[11-Apr-2014 23:55:59] S Transfer-Encoding: chunked
[11-Apr-2014 23:55:59] S Connection: close
[11-Apr-2014 23:55:59] S Vary: Accept-Encoding
[11-Apr-2014 23:55:59] S Set-Cookie: tmgioct=5348810fc497b70454482190; expires=Mon, 08-Apr-2024 23:55:59 GMT; path=/; httponly
[11-Apr-2014 23:55:59] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[11-Apr-2014 23:55:59] S X-UA-Compatible: IE=Edge,chrome=1
[11-Apr-2014 23:55:59] S 
[11-Apr-2014 23:55:59] S 1db
[11-Apr-2014 23:55:59] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397245106,"posts":48,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[11-Apr-2014 23:55:59] S 0
[11-Apr-2014 23:55:59] S 
[11-Apr-2014 23:55:59] Disconnected from api.tumblr.com
[11-Apr-2014 23:56:00] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[11-Apr-2014 23:56:00] Connecting to api.tumblr.com
[11-Apr-2014 23:56:00] Resolving HTTP server domain "api.tumblr.com"...
[11-Apr-2014 23:56:00] Connecting to HTTP server IP 66.6.40.36 port 80...
[11-Apr-2014 23:56:00] Connected to api.tumblr.com
[11-Apr-2014 23:56:00] C GET /v2/user/info HTTP/1.1
[11-Apr-2014 23:56:00] C Host: api.tumblr.com
[11-Apr-2014 23:56:00] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[11-Apr-2014 23:56:00] C Accept: */*
[11-Apr-2014 23:56:00] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="72dda7fdd700005a90ff6b56a6917983",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397260560",oauth_version="1.0",oauth_token="AUTH_TOKEN",oauth_signature="KRgoXOuirV%2FQ3t1kZC50EJ2W2bg%3D"
[11-Apr-2014 23:56:00] C Connection: Keep-Alive
[11-Apr-2014 23:56:00] C 
[11-Apr-2014 23:56:01] S HTTP/1.1 200 OK
[11-Apr-2014 23:56:01] S Server: nginx
[11-Apr-2014 23:56:01] S Date: Fri, 11 Apr 2014 23:56:00 GMT
[11-Apr-2014 23:56:01] S Content-Type: application/json; charset=utf-8
[11-Apr-2014 23:56:01] S Transfer-Encoding: chunked
[11-Apr-2014 23:56:01] S Connection: close
[11-Apr-2014 23:56:01] S Vary: Accept-Encoding
[11-Apr-2014 23:56:01] S Set-Cookie: tmgioct=53488110d843090450206410; expires=Mon, 08-Apr-2024 23:56:00 GMT; path=/; httponly
[11-Apr-2014 23:56:01] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[11-Apr-2014 23:56:01] S X-UA-Compatible: IE=Edge,chrome=1
[11-Apr-2014 23:56:01] S 
[11-Apr-2014 23:56:01] S 1db
[11-Apr-2014 23:56:01] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397245106,"posts":48,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[11-Apr-2014 23:56:01] S 0
[11-Apr-2014 23:56:01] S 
[11-Apr-2014 23:56:01] Disconnected from api.tumblr.com
fabacab commented 10 years ago

One thing that jumps out at me immediately is that the post you're trying to edit (the one with ID 2147483647) doesn't exist on Tumblr. So, a 401 Not Authorized is actually expected in that case. Have you perhaps accidentally deleted that post from Tumblr?

One easy way to check if this is in fact the problem is to go to your post in WordPress and view the post's custom fields. (If that's not already visible in your WordPress post editing screen, click on "Screen options" in the upper right corner of your window and make sure the option labelled "Custom fields" has a check mark in its box.) In the Custom fields box, delete the custom field whose name is tumblr_post_id. Tumblr Crosspostr uses that to make updates to posts the post on Tumblr if you edit it on WordPress in the future, however if that post is deleted from Tumblr in a fashion other than through WordPress, Tumblr Crosspostr won't know about the deletion and will continue trying to update that post ID, which will fail in exactly the way you've described.

If you do have this post on Tumblr but it for some reason has a different ID than the one Tumblr Crosspostr knows about, you can simply replace the tumblr_post_id value in the WordPress editing box with the known-good one from the URL of your Tumblr post (the number after /post/ in the Web address of your Tumblr post when viewing that single post), save the new custom field value, and try crossposting again.

Thanks for the log and let me know what happens if you try this?

santsys commented 10 years ago

Ahh... that helped. I ended up just deleting the post information and it went over... It looks like all of my previous posts give the 401 error, i'm not sure why. The ID numbers seem to match up.

If i try to update the post i just posted it gives the 401 error again... The ID numbers match up.

WordPress Info

tumblr_post_id = 82430899848

Tumblr Info

Edit Id = 82430899848
Post Link: http://santsys.tumblr.com/post/82430899848

So it looks like there is something causing the posts to not link up...

fabacab commented 10 years ago

Um, now I am confused. Are you trying to say this has resolved your issue or are you saying that there is a different issue? If the latter, can you please describe that issue in more detail?

santsys commented 10 years ago

A different issue... basically once a post is posted to tumblr (there is a tumblr post ID in the WordPress Custom Fields) it will not update and always gives the 401 error.

fabacab commented 10 years ago

Okay. From the beginning, after crossposting to Tumblr, verify that the ID of the post on Tumblr and the one in your WordPress post's tumblr_post_id custom field are the same? In either case, I'd like to see the log for that, too. :)

santsys commented 10 years ago

The post id's are the same in both system:

tumblr_post_id = 82430899848 http://santsys.tumblr.com/post/82430899848

Here is the debug log. Thanks!

In Page Error:

object(stdClass)#352 (2) {
  ["meta"]=>
  object(stdClass)#349 (2) {
    ["status"]=>
    int(401)
    ["msg"]=>
    string(14) "Not Authorized"
  }
  ["response"]=>
  array(0) {
  }
}
[12-Apr-2014 01:09:34] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[12-Apr-2014 01:09:34] Connecting to api.tumblr.com
[12-Apr-2014 01:09:34] Resolving HTTP server domain "api.tumblr.com"...
[12-Apr-2014 01:09:34] Connecting to HTTP server IP 66.6.40.61 port 80...
[12-Apr-2014 01:09:34] Connected to api.tumblr.com
[12-Apr-2014 01:09:34] C GET /v2/user/info HTTP/1.1
[12-Apr-2014 01:09:34] C Host: api.tumblr.com
[12-Apr-2014 01:09:34] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[12-Apr-2014 01:09:34] C Accept: */*
[12-Apr-2014 01:09:34] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="5ec289d6747b0c4556871bb74629c9cc",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397264974",oauth_version="1.0",oauth_token="OAUTH_TOKEN",oauth_signature="OAUTH_SIGNATURE"
[12-Apr-2014 01:09:34] C Connection: Keep-Alive
[12-Apr-2014 01:09:34] C 
[12-Apr-2014 01:09:35] S HTTP/1.1 200 OK
[12-Apr-2014 01:09:35] S Server: nginx
[12-Apr-2014 01:09:35] S Date: Sat, 12 Apr 2014 01:09:34 GMT
[12-Apr-2014 01:09:35] S Content-Type: application/json; charset=utf-8
[12-Apr-2014 01:09:35] S Transfer-Encoding: chunked
[12-Apr-2014 01:09:35] S Connection: close
[12-Apr-2014 01:09:35] S Vary: Accept-Encoding
[12-Apr-2014 01:09:35] S Set-Cookie: tmgioct=5348924ed91d440645185010; expires=Tue, 09-Apr-2024 01:09:34 GMT; path=/; httponly
[12-Apr-2014 01:09:35] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[12-Apr-2014 01:09:35] S X-UA-Compatible: IE=Edge,chrome=1
[12-Apr-2014 01:09:35] S 
[12-Apr-2014 01:09:35] S 1db
[12-Apr-2014 01:09:35] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397262621,"posts":49,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[12-Apr-2014 01:09:35] S 0
[12-Apr-2014 01:09:35] S 
[12-Apr-2014 01:09:35] Disconnected from api.tumblr.com
[12-Apr-2014 01:09:35] OAuth client: Accessing the API call at http://api.tumblr.com/v2/blog/santsys.tumblr.com/post/edit
[12-Apr-2014 01:09:35] Connecting to api.tumblr.com
[12-Apr-2014 01:09:35] Resolving HTTP server domain "api.tumblr.com"...
[12-Apr-2014 01:09:35] Connecting to HTTP server IP 66.6.40.61 port 80...
[12-Apr-2014 01:09:35] Connected to api.tumblr.com
[12-Apr-2014 01:09:35] C POST /v2/blog/santsys.tumblr.com/post/edit HTTP/1.1
[12-Apr-2014 01:09:35] C Host: api.tumblr.com
[12-Apr-2014 01:09:35] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[12-Apr-2014 01:09:35] C Accept: */*
[12-Apr-2014 01:09:35] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="5b5b7e508892b7b8b0a82eef81a3ea39",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397264975",oauth_version="1.0",oauth_token="OAUTH_TOKEN",oauth_signature="tmICpxW2MAs8DdxUAWRLs5YygyQ%3D"
[12-Apr-2014 01:09:35] C Connection: Keep-Alive
[12-Apr-2014 01:09:35] C Content-Type: application/x-www-form-urlencoded
[12-Apr-2014 01:09:35] C Content-Length: 1079
[12-Apr-2014 01:09:35] C 
[12-Apr-2014 01:09:35] C type=text&state=published&tags=Digital+Caliper%2CTools%2C&date=2014-04-11+03%3A07%3A20+GMT&format=html&slug=neiko-tools-6-digital-caliper-01407a&source_url=http%3A%2F%2Fwww.santsys.com%2Fs2blog%2Fneiko-tools-6-digital-caliper-01407a%2F&title=Neiko+Tools+-+6%22+Digital+Caliper+%2801407A%29&body=%3Cp%3EI%26%238217%3Bve+been+in+need+of+my+own+set+of+digital+calipers+for+a+while+now%2C+so+I+decided+to+take+a+look+on+Amazon+and+see+what+options+I+had.+There+are+quite+a+few+options%26%238230%3B+The+Neiko+6+in.+caliper+was+a+%26%238220%3Bbest+seller%26%238221%3B+and+had+good+reviews.+And+for+%2417%2C+I+figured+I%26%238217%3Bd%26hellip%3B%3C%2Fp%3E%0A%3Cp+class%3D%22tumblr-crosspostr-linkback%22%3E%3Ca+href%3D%22http%3A%2F%2Fwww.santsys.com%2Fs2blog%2Fneiko-tools-6-digital-caliper-01407a%2F%22+title%3D%22Go+to+the+original+post.%22+rel%3D%22bookmark%22%3ENeiko+Tools+%26%238211%3B+6%26%238243%3B+Digital+Caliper+%2801407A%29%3C%2Fa%3E+was+originally+published+on+%3Ca+href%3D%22http%3A%2F%2Fwww.santsys.com%2Fs2blog%22%3ES%5E2+Blog%3C%2Fa%3E%3C%2Fp%3E&tweet=off&id=2147483647
[12-Apr-2014 01:09:35] S HTTP/1.1 401 Not Authorized
[12-Apr-2014 01:09:35] S Server: nginx
[12-Apr-2014 01:09:35] S Date: Sat, 12 Apr 2014 01:09:35 GMT
[12-Apr-2014 01:09:35] S Content-Type: application/json; charset=utf-8
[12-Apr-2014 01:09:35] S Transfer-Encoding: chunked
[12-Apr-2014 01:09:35] S Connection: close
[12-Apr-2014 01:09:35] S Set-Cookie: tmgioct=5348924f64bc160485193990; expires=Tue, 09-Apr-2024 01:09:35 GMT; path=/; httponly
[12-Apr-2014 01:09:35] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[12-Apr-2014 01:09:35] S 
[12-Apr-2014 01:09:35] S 3c
[12-Apr-2014 01:09:35] S {"meta":{"status":401,"msg":"Not Authorized"},"response":[]}
[12-Apr-2014 01:09:35] S 0
[12-Apr-2014 01:09:35] S 
[12-Apr-2014 01:09:35] Disconnected from api.tumblr.com
[12-Apr-2014 01:09:35] OAuth client: Could not retrieve the OAuth access token. Error: it was not possible to access the API call: it was returned an unexpected response status 401 Response: {"meta":{"status":401,"msg":"Not Authorized"},"response":[]}
[12-Apr-2014 01:09:42] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[12-Apr-2014 01:09:42] Connecting to api.tumblr.com
[12-Apr-2014 01:09:42] Resolving HTTP server domain "api.tumblr.com"...
[12-Apr-2014 01:09:42] Connecting to HTTP server IP 66.6.40.61 port 80...
[12-Apr-2014 01:09:42] Connected to api.tumblr.com
[12-Apr-2014 01:09:42] C GET /v2/user/info HTTP/1.1
[12-Apr-2014 01:09:42] C Host: api.tumblr.com
[12-Apr-2014 01:09:42] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[12-Apr-2014 01:09:42] C Accept: */*
[12-Apr-2014 01:09:42] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="2f27079f481d7a704d5989f44558ae38",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397264982",oauth_version="1.0",oauth_token="OAUTH_TOKEN",oauth_signature="%2B5lECBiL02hU6xnEGao7RFC%2BC9E%3D"
[12-Apr-2014 01:09:42] C Connection: Keep-Alive
[12-Apr-2014 01:09:42] C 
[12-Apr-2014 01:09:43] S HTTP/1.1 200 OK
[12-Apr-2014 01:09:43] S Server: nginx
[12-Apr-2014 01:09:43] S Date: Sat, 12 Apr 2014 01:09:42 GMT
[12-Apr-2014 01:09:43] S Content-Type: application/json; charset=utf-8
[12-Apr-2014 01:09:43] S Transfer-Encoding: chunked
[12-Apr-2014 01:09:43] S Connection: close
[12-Apr-2014 01:09:43] S Vary: Accept-Encoding
[12-Apr-2014 01:09:43] S Set-Cookie: tmgioct=53489256c2e9390524910990; expires=Tue, 09-Apr-2024 01:09:42 GMT; path=/; httponly
[12-Apr-2014 01:09:43] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[12-Apr-2014 01:09:43] S X-UA-Compatible: IE=Edge,chrome=1
[12-Apr-2014 01:09:43] S 
[12-Apr-2014 01:09:43] S 1db
[12-Apr-2014 01:09:43] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397262621,"posts":49,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[12-Apr-2014 01:09:43] S 0
[12-Apr-2014 01:09:43] S 
[12-Apr-2014 01:09:43] Disconnected from api.tumblr.com
[12-Apr-2014 01:09:43] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[12-Apr-2014 01:09:43] Connecting to api.tumblr.com
[12-Apr-2014 01:09:43] Resolving HTTP server domain "api.tumblr.com"...
[12-Apr-2014 01:09:43] Connecting to HTTP server IP 66.6.40.61 port 80...
[12-Apr-2014 01:09:43] Connected to api.tumblr.com
[12-Apr-2014 01:09:43] C GET /v2/user/info HTTP/1.1
[12-Apr-2014 01:09:43] C Host: api.tumblr.com
[12-Apr-2014 01:09:43] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[12-Apr-2014 01:09:43] C Accept: */*
[12-Apr-2014 01:09:43] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="ca2455b5a1ccbadb1383128eb5566c4f",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397264983",oauth_version="1.0",oauth_token="OAUTH_TOKEN",oauth_signature="qynyPOkjdOOfHsaOQI7kcT5dgyw%3D"
[12-Apr-2014 01:09:43] C Connection: Keep-Alive
[12-Apr-2014 01:09:43] C 
[12-Apr-2014 01:09:43] S HTTP/1.1 200 OK
[12-Apr-2014 01:09:43] S Server: nginx
[12-Apr-2014 01:09:43] S Date: Sat, 12 Apr 2014 01:09:43 GMT
[12-Apr-2014 01:09:43] S Content-Type: application/json; charset=utf-8
[12-Apr-2014 01:09:43] S Transfer-Encoding: chunked
[12-Apr-2014 01:09:43] S Connection: close
[12-Apr-2014 01:09:43] S Vary: Accept-Encoding
[12-Apr-2014 01:09:43] S Set-Cookie: tmgioct=534892576b3de20476759530; expires=Tue, 09-Apr-2024 01:09:43 GMT; path=/; httponly
[12-Apr-2014 01:09:43] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[12-Apr-2014 01:09:43] S X-UA-Compatible: IE=Edge,chrome=1
[12-Apr-2014 01:09:43] S 
[12-Apr-2014 01:09:43] S 1db
[12-Apr-2014 01:09:43] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397262621,"posts":49,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[12-Apr-2014 01:09:43] S 0
[12-Apr-2014 01:09:43] S 
[12-Apr-2014 01:09:43] Disconnected from api.tumblr.com
[12-Apr-2014 01:09:44] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[12-Apr-2014 01:09:44] Connecting to api.tumblr.com
[12-Apr-2014 01:09:44] Resolving HTTP server domain "api.tumblr.com"...
[12-Apr-2014 01:09:44] Connecting to HTTP server IP 66.6.40.61 port 80...
[12-Apr-2014 01:09:44] Connected to api.tumblr.com
[12-Apr-2014 01:09:44] C GET /v2/user/info HTTP/1.1
[12-Apr-2014 01:09:44] C Host: api.tumblr.com
[12-Apr-2014 01:09:44] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[12-Apr-2014 01:09:44] C Accept: */*
[12-Apr-2014 01:09:44] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="fd9c352eca0a93a617e6a32aaecc4d68",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397264984",oauth_version="1.0",oauth_token="OAUTH_TOKEN",oauth_signature="6V9h1oEQGAl2CTtQcD01zwKyOKo%3D"
[12-Apr-2014 01:09:44] C Connection: Keep-Alive
[12-Apr-2014 01:09:44] C 
[12-Apr-2014 01:09:44] S HTTP/1.1 200 OK
[12-Apr-2014 01:09:44] S Server: nginx
[12-Apr-2014 01:09:44] S Date: Sat, 12 Apr 2014 01:09:44 GMT
[12-Apr-2014 01:09:44] S Content-Type: application/json; charset=utf-8
[12-Apr-2014 01:09:44] S Transfer-Encoding: chunked
[12-Apr-2014 01:09:44] S Connection: close
[12-Apr-2014 01:09:44] S Vary: Accept-Encoding
[12-Apr-2014 01:09:44] S Set-Cookie: tmgioct=534892582382e60542958480; expires=Tue, 09-Apr-2024 01:09:44 GMT; path=/; httponly
[12-Apr-2014 01:09:44] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[12-Apr-2014 01:09:44] S X-UA-Compatible: IE=Edge,chrome=1
[12-Apr-2014 01:09:44] S 
[12-Apr-2014 01:09:44] S 1db
[12-Apr-2014 01:09:44] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397262621,"posts":49,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[12-Apr-2014 01:09:44] S 0
[12-Apr-2014 01:09:44] S 
[12-Apr-2014 01:09:44] Disconnected from api.tumblr.com
[12-Apr-2014 01:09:45] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[12-Apr-2014 01:09:45] Connecting to api.tumblr.com
[12-Apr-2014 01:09:45] Resolving HTTP server domain "api.tumblr.com"...
[12-Apr-2014 01:09:45] Connecting to HTTP server IP 66.6.40.61 port 80...
[12-Apr-2014 01:09:45] Connected to api.tumblr.com
[12-Apr-2014 01:09:45] C GET /v2/user/info HTTP/1.1
[12-Apr-2014 01:09:45] C Host: api.tumblr.com
[12-Apr-2014 01:09:45] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[12-Apr-2014 01:09:45] C Accept: */*
[12-Apr-2014 01:09:45] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="77609e5f4392cf119c6f24a48f661746",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397264985",oauth_version="1.0",oauth_token="OAUTH_TOKEN",oauth_signature="sNhf6EJBnj8WXggQW%2BardeWmWcY%3D"
[12-Apr-2014 01:09:45] C Connection: Keep-Alive
[12-Apr-2014 01:09:45] C 
[12-Apr-2014 01:09:45] S HTTP/1.1 200 OK
[12-Apr-2014 01:09:45] S Server: nginx
[12-Apr-2014 01:09:45] S Date: Sat, 12 Apr 2014 01:09:45 GMT
[12-Apr-2014 01:09:45] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[12-Apr-2014 01:09:45] S Content-Type: application/json; charset=utf-8
[12-Apr-2014 01:09:45] Connecting to api.tumblr.com
[12-Apr-2014 01:09:45] S Transfer-Encoding: chunked
[12-Apr-2014 01:09:45] Resolving HTTP server domain "api.tumblr.com"...
[12-Apr-2014 01:09:45] S Connection: close
[12-Apr-2014 01:09:45] Connecting to HTTP server IP 66.6.40.61 port 80...
[12-Apr-2014 01:09:45] S Vary: Accept-Encoding
[12-Apr-2014 01:09:45] S Set-Cookie: tmgioct=534892594c67520893149910; expires=Tue, 09-Apr-2024 01:09:45 GMT; path=/; httponly
[12-Apr-2014 01:09:45] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[12-Apr-2014 01:09:45] S X-UA-Compatible: IE=Edge,chrome=1
[12-Apr-2014 01:09:45] S 
[12-Apr-2014 01:09:45] S 1db
[12-Apr-2014 01:09:45] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397262621,"posts":49,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[12-Apr-2014 01:09:45] S 0
[12-Apr-2014 01:09:45] S 
[12-Apr-2014 01:09:45] Disconnected from api.tumblr.com
[12-Apr-2014 01:09:45] Connected to api.tumblr.com
[12-Apr-2014 01:09:45] C GET /v2/user/info HTTP/1.1
[12-Apr-2014 01:09:45] C Host: api.tumblr.com
[12-Apr-2014 01:09:45] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[12-Apr-2014 01:09:45] C Accept: */*
[12-Apr-2014 01:09:45] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="79f90ae5f4b1c87c2a4d107e41254b11",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397264985",oauth_version="1.0",oauth_token="OAUTH_TOKEN",oauth_signature="13C1tF19UeA9sCrq21SNOUfsSLU%3D"
[12-Apr-2014 01:09:45] C Connection: Keep-Alive
[12-Apr-2014 01:09:45] C 
[12-Apr-2014 01:09:45] S HTTP/1.1 200 OK
[12-Apr-2014 01:09:45] S Server: nginx
[12-Apr-2014 01:09:45] S Date: Sat, 12 Apr 2014 01:09:45 GMT
[12-Apr-2014 01:09:45] S Content-Type: application/json; charset=utf-8
[12-Apr-2014 01:09:45] S Transfer-Encoding: chunked
[12-Apr-2014 01:09:45] S Connection: close
[12-Apr-2014 01:09:45] S Vary: Accept-Encoding
[12-Apr-2014 01:09:45] S Set-Cookie: tmgioct=53489259a549e90030503610; expires=Tue, 09-Apr-2024 01:09:45 GMT; path=/; httponly
[12-Apr-2014 01:09:45] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[12-Apr-2014 01:09:45] S X-UA-Compatible: IE=Edge,chrome=1
[12-Apr-2014 01:09:45] S 
[12-Apr-2014 01:09:45] S 1db
[12-Apr-2014 01:09:45] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397262621,"posts":49,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[12-Apr-2014 01:09:45] S 0
[12-Apr-2014 01:09:45] S 
[12-Apr-2014 01:09:45] Disconnected from api.tumblr.com
[12-Apr-2014 01:10:06] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[12-Apr-2014 01:10:06] Connecting to api.tumblr.com
[12-Apr-2014 01:10:06] Resolving HTTP server domain "api.tumblr.com"...
[12-Apr-2014 01:10:06] Connecting to HTTP server IP 66.6.40.61 port 80...
[12-Apr-2014 01:10:06] Connected to api.tumblr.com
[12-Apr-2014 01:10:06] C GET /v2/user/info HTTP/1.1
[12-Apr-2014 01:10:06] C Host: api.tumblr.com
[12-Apr-2014 01:10:06] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[12-Apr-2014 01:10:06] C Accept: */*
[12-Apr-2014 01:10:06] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="fdd606b73b4de0b4b483761b94d4c513",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397265006",oauth_version="1.0",oauth_token="OAUTH_TOKEN",oauth_signature="KaMfJykSjuknyEBETQdtCc7qYmw%3D"
[12-Apr-2014 01:10:06] C Connection: Keep-Alive
[12-Apr-2014 01:10:06] C 
[12-Apr-2014 01:10:06] S HTTP/1.1 200 OK
[12-Apr-2014 01:10:06] S Server: nginx
[12-Apr-2014 01:10:06] S Date: Sat, 12 Apr 2014 01:10:06 GMT
[12-Apr-2014 01:10:06] S Content-Type: application/json; charset=utf-8
[12-Apr-2014 01:10:06] S Transfer-Encoding: chunked
[12-Apr-2014 01:10:06] S Connection: close
[12-Apr-2014 01:10:06] S Vary: Accept-Encoding
[12-Apr-2014 01:10:06] S Set-Cookie: tmgioct=5348926e7933170542820580; expires=Tue, 09-Apr-2024 01:10:06 GMT; path=/; httponly
[12-Apr-2014 01:10:06] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[12-Apr-2014 01:10:06] S X-UA-Compatible: IE=Edge,chrome=1
[12-Apr-2014 01:10:06] S 
[12-Apr-2014 01:10:06] S 1db
[12-Apr-2014 01:10:06] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397262621,"posts":49,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[12-Apr-2014 01:10:06] S 0
[12-Apr-2014 01:10:06] S 
[12-Apr-2014 01:10:06] Disconnected from api.tumblr.com
[12-Apr-2014 01:10:07] OAuth client: Accessing the API call at http://api.tumblr.com/v2/user/info
[12-Apr-2014 01:10:07] Connecting to api.tumblr.com
[12-Apr-2014 01:10:07] Resolving HTTP server domain "api.tumblr.com"...
[12-Apr-2014 01:10:07] Connecting to HTTP server IP 66.6.40.61 port 80...
[12-Apr-2014 01:10:07] Connected to api.tumblr.com
[12-Apr-2014 01:10:07] C GET /v2/user/info HTTP/1.1
[12-Apr-2014 01:10:07] C Host: api.tumblr.com
[12-Apr-2014 01:10:07] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.93 $)
[12-Apr-2014 01:10:07] C Accept: */*
[12-Apr-2014 01:10:07] C Authorization: OAuth oauth_consumer_key="MY_KEY",oauth_nonce="e4cd8076431cca5169c87bc21a8994d1",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1397265007",oauth_version="1.0",oauth_token="OAUTH_TOKEN",oauth_signature="0QLqh1XqLCN1myvZV%2FImkosHeu4%3D"
[12-Apr-2014 01:10:07] C Connection: Keep-Alive
[12-Apr-2014 01:10:07] C 
[12-Apr-2014 01:10:08] S HTTP/1.1 200 OK
[12-Apr-2014 01:10:08] S Server: nginx
[12-Apr-2014 01:10:08] S Date: Sat, 12 Apr 2014 01:10:08 GMT
[12-Apr-2014 01:10:08] S Content-Type: application/json; charset=utf-8
[12-Apr-2014 01:10:08] S Transfer-Encoding: chunked
[12-Apr-2014 01:10:08] S Connection: close
[12-Apr-2014 01:10:08] S Vary: Accept-Encoding
[12-Apr-2014 01:10:08] S Set-Cookie: tmgioct=5348926fe33ca90272101350; expires=Tue, 09-Apr-2024 01:10:07 GMT; path=/; httponly
[12-Apr-2014 01:10:08] S P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
[12-Apr-2014 01:10:08] S X-UA-Compatible: IE=Edge,chrome=1
[12-Apr-2014 01:10:08] S 
[12-Apr-2014 01:10:08] S 1db
[12-Apr-2014 01:10:08] S {"meta":{"status":200,"msg":"OK"},"response":{"user":{"name":"santsys","likes":1,"following":8,"default_post_format":"html","blogs":[{"name":"santsys","url":"http:\/\/santsys.tumblr.com\/","followers":1,"primary":true,"title":"S^2 Blog","description":"Computer, shooting, and more...","admin":true,"updated":1397262621,"posts":49,"messages":0,"queue":0,"drafts":0,"share_likes":true,"ask":false,"tweet":"Y","facebook":"N","facebook_opengraph_enabled":"N","type":"public"}]}}}
[12-Apr-2014 01:10:08] S 0
[12-Apr-2014 01:10:08] S 
[12-Apr-2014 01:10:08] Disconnected from api.tumblr.com
fabacab commented 10 years ago

That log shows the exact same thing. The ID that you have in WordPress (or at least that's getting picked up by Tumblr Crosspostr) is 2147483647. As I mentioned earlier, this does not exist.

Are you certain you've saved the correct tumblr_post_id in your WordPress custom field?

santsys commented 10 years ago

That's strange... the ID in the post is the correct one, see image below. Where else can the post ID come from? error-02

santsys commented 10 years ago

I did a query and that value isn't even in the database... Is it maybe hard coded somewhere?

SELECT * 
FROM  `wp_postmeta` 
WHERE meta_value =  '2147483647'

That returns no values...

The specific post has normal data...

SELECT * 
FROM  `wp_postmeta` 
WHERE post_id = 601
post id meta key meta value
601 _edit_lock 1397265241:1
601 _edit_last 1
601 _wpas_skip_6980622 1
601 tumblr_crosspostr_use_excerpt 1
601 tumblr_post_id 82430899848
fabacab commented 10 years ago

No, post IDs are not hardcoded anywhere. But WordPress does cache a post's meta fields on its own. Caching plugins may also extend the life of the default WordPress cache. I would suggest disabling all other plugins for the time being, verifying again that your post's custom field value is correct, and then trying again.

santsys commented 10 years ago

I'm not sure where the system is getting that number from then... It seems to be made up. all of my post id numbers are much higher than that number... so it seems to be very random.

fabacab commented 10 years ago

Yeah, that's definitely bizarre. I can't replicate the problem you're having, either. That's why I suggest you pare things down.

If I were you, I'd remove everything that isn't stock WordPress core, and make sure only Tumblr Crosspostr is running (no other plugins, drop-ins, custom themes, etc.) and if the problem still persists, send me details of your system configuration. (A phpinfo() call and WordPress version would help.) If you can't reproduce the issue in that environment, add back one plugin, drop-in, and theme at a time, testing after each addition.

Without more information, I can't tell you what's happening or why your system insists on using that ID value. Sorry. :(

santsys commented 10 years ago

OK! I found the issue. It's a type casting issue...

Your function crosspostToTumblr fails because it is converting the $tumblr_id to an integer. But because of the size of the number its causing an overflow.

So, in the file tumblr-crosspostr.php...

private function crosspostToTumblr ($blog, $params, $tumblr_id = false, $deleting = false) {
        // TODO: Smoothen this deleting thing.
        //       Cancel WordPress deletions if Tumblr deletions aren't working?
        if ($deleting === true && $tumblr_id) {
            $params['id'] = (int) $tumblr_id;
            return $this->tumblr->deleteFromTumblrBlog($blog, $params);
        } else if ($tumblr_id) {
            $params['id'] = (int) $tumblr_id;
            return $this->tumblr->editOnTumblrBlog($blog, $params);
        } else {
            return $this->tumblr->postToTumblrBlog($blog, $params);
        }
    }

Should become

private function crosspostToTumblr ($blog, $params, $tumblr_id = false, $deleting = false) {
        // TODO: Smoothen this deleting thing.
        //       Cancel WordPress deletions if Tumblr deletions aren't working?
        if ($deleting === true && $tumblr_id) {
            $params['id'] = $tumblr_id;
            return $this->tumblr->deleteFromTumblrBlog($blog, $params);
        } else if ($tumblr_id) {
            $params['id'] = $tumblr_id;
            return $this->tumblr->editOnTumblrBlog($blog, $params);
        } else {
            return $this->tumblr->postToTumblrBlog($blog, $params);
        }
    }

with that change in place, it works.

fabacab commented 10 years ago

Huh, nice catch. :) Are you running a 32 bit PHP system? I'll test this tonight and release a bugfix once I verify that change doesn't break anything else in any of my tests.

santsys commented 10 years ago

I have it on a GoDaddy host, so who knows what it's actually running on. So it is probably 32-bit, or has a really restrictive configuration.

I have the code implemented on my system, so everything seems to be working now. Hopefully it doesn't break anything, but it should be good. I traced the code back (as much as i could), and that is the only place a conversion was being made in that code path, everything else was handling that ID as a string (from the post meta data).

Thanks again!