Error when cloning an item via Podio-PHP
Hi all, I feel this is probably something dumb that I am overlooking, but I am getting the following error when trying to clone an item via PHP. (The paths look odd because I have obfuscated them.) [04-Oct-2013 17:05:37] PHP Fatal error: Uncaught PodioNotFoundError: "No matching operation could be found. No body was given." Request URL: http://api.podio.com/item/83296698/clone?silent=1&hook=false Request Body: null _Stack Trace: _ #0 podio/lib/Podio.php(271): Podio::request('POST', '/item/83296698/...', Array, Array) #1 podio/models/PodioItem.php(150): Podio::post('/item/83296698/...') #2 script.php(17): PodioItem::duplicate(83296698, Array) #3 {main} _ thrown in podio/lib/Podio.php on line 241_ The following code is being used to call the duplicate: $item_id = (int) PodioItem::duplicate( $old_item_id, array( 'hook' => false, 'silent' => true ) ); Any help would be much appreciated as I am so close to completing this script! Nathan

  • Actually there was a bug here in the API, that I found independently yesterday. The fix was deployed yesterday afternoon Copenhagen time, so I think that is what made it work actually.
  • It's always the outdated client! Doh! I did a diff on the version I had and the current and couldn't see differences in the relevant files, but replacing the whole library worked :) Thanks Andreas
  • It's a POST operation so it's natural that you get a 404 if you point your browser there (since that results in a GET operation). You can't really use your browser for debugging like that. Anyway, everything works as expected for me. There's a failure if the 'hook' parameter is sent along because it's not supported, but sending a 'silent' parameter works and leaving out all options works as well. If you're not up the newest podio-php try upgrading. And make sure you authenticate as someone/something that has rights to create items in the given app. /Andreas
  • Sorry, I should have stripped that from my example. I get the same error with no parameters passed (barring the item id of course). Curiously, when I browse to that URL, I get a path not found error.
  • Doesn't look like that operation supports the 'hook' parameter. What happens if you leave it out? /Andreas
This question is closed.