OK, so.. I'm trying to retrieve the template info for a given template, but for some reason that's very hard.
Whenever I try to fetch the template info the ID is getting set to 1 ór I get an error saying "A backend database error has occurred. Please try again later or report this issue."
I've been in all the steps of the code, echo'd / printed / added to Excetion what the value of the tpl ID was at that point (it's for a plugin, going through some steps before it comes to the Mailchimp API): it's the correct ID.
Then I went into the Mailchimp Templates.php : correct ID. Then I went into Mailchimp.php and check what the value for template_id was right before it was put into json: correct ID.
Then I thought: let's check what it looks like after it's been through json_encode: still the correct ID.
return $this->api->templates->info( $tpl_id );
catch ( Mailchimp_Error $e )
throw new Exception( sprintf( __('The template info for ID %d could not be retrieved.','onx-cp'), $tpl_id ) );
the first $tpl_id (within try) gives the correct template ID, however, within the catch-part $tpl_id suddenly is 1 (in Mailchimp it's own Exceptions too, I just added it there for troubleshooting purposes).