{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/babble/issues/247","labels_url":"https://api.github.com/repos/Automattic/babble/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/babble/issues/247/comments","events_url":"https://api.github.com/repos/Automattic/babble/issues/247/events","html_url":"https://github.com/Automattic/babble/issues/247","id":59876023,"number":247,"title":"Post types with names over 14 characters, taxonomy names over 26 characters","user":{"login":"simonwheatley","id":233434,"avatar_url":"https://avatars.githubusercontent.com/u/233434?v=3","gravatar_id":"","url":"https://api.github.com/users/simonwheatley","html_url":"https://github.com/simonwheatley","followers_url":"https://api.github.com/users/simonwheatley/followers","following_url":"https://api.github.com/users/simonwheatley/following{/other_user}","gists_url":"https://api.github.com/users/simonwheatley/gists{/gist_id}","starred_url":"https://api.github.com/users/simonwheatley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonwheatley/subscriptions","organizations_url":"https://api.github.com/users/simonwheatley/orgs","repos_url":"https://api.github.com/users/simonwheatley/repos","events_url":"https://api.github.com/users/simonwheatley/events{/privacy}","received_events_url":"https://api.github.com/users/simonwheatley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/babble/labels/enhancement","name":"enhancement","color":"0b02e1"}],"state":"closed","locked":false,"assignee":{"login":"johnbillion","id":208434,"avatar_url":"https://avatars.githubusercontent.com/u/208434?v=3","gravatar_id":"","url":"https://api.github.com/users/johnbillion","html_url":"https://github.com/johnbillion","followers_url":"https://api.github.com/users/johnbillion/followers","following_url":"https://api.github.com/users/johnbillion/following{/other_user}","gists_url":"https://api.github.com/users/johnbillion/gists{/gist_id}","starred_url":"https://api.github.com/users/johnbillion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnbillion/subscriptions","organizations_url":"https://api.github.com/users/johnbillion/orgs","repos_url":"https://api.github.com/users/johnbillion/repos","events_url":"https://api.github.com/users/johnbillion/events{/privacy}","received_events_url":"https://api.github.com/users/johnbillion/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Automattic/babble/milestones/10","html_url":"https://github.com/Automattic/babble/milestones/Code%20Review","labels_url":"https://api.github.com/repos/Automattic/babble/milestones/10/labels","id":1002857,"number":10,"title":"Code Review","description":"","creator":{"login":"simonwheatley","id":233434,"avatar_url":"https://avatars.githubusercontent.com/u/233434?v=3","gravatar_id":"","url":"https://api.github.com/users/simonwheatley","html_url":"https://github.com/simonwheatley","followers_url":"https://api.github.com/users/simonwheatley/followers","following_url":"https://api.github.com/users/simonwheatley/following{/other_user}","gists_url":"https://api.github.com/users/simonwheatley/gists{/gist_id}","starred_url":"https://api.github.com/users/simonwheatley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonwheatley/subscriptions","organizations_url":"https://api.github.com/users/simonwheatley/orgs","repos_url":"https://api.github.com/users/simonwheatley/repos","events_url":"https://api.github.com/users/simonwheatley/events{/privacy}","received_events_url":"https://api.github.com/users/simonwheatley/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":37,"state":"open","created_at":"2015-03-02T21:41:21Z","updated_at":"2015-08-07T10:32:41Z","due_on":null,"closed_at":null},"comments":16,"created_at":"2015-03-04T22:52:50Z","updated_at":"2015-08-07T10:32:41Z","closed_at":"2015-08-07T10:32:41Z","body":"When registering a translated (shadow) post type in `Babble_Post_Public::registered_post_type`, if a `post_type` string is longer than 14 characters, and the language is two two letter codes, then WordPress `register_post_type` will return a `WP_Error` and trigger a `_doing_it_wrong_call`, e.g. post type `012345678912345` would become a translated post type `012345678912345_xx_xx` (21 characters long) which would cause the issue described.\r\n\r\nWe should:\r\n\r\n1. Change where we are currently calling `trigger_error` (or `throw new exception`) to instead call `_doing_it_wrong`\r\n2. `wp_die` if `WP_DEBUG` is defined and true, or throw an admin notice if not\r\n3. Stretch goal: Do not allow any translation of a post type if one of the translation post types for it will go over 20 characters\r\n\r\nThere is a similar problem with taxonomy names, except the limit is 26 characters (32 characters minus the six characters we need for the lang code suffix), which we should address in a similar way."},"comment":{"url":"https://api.github.com/repos/Automattic/babble/issues/comments/128668853","html_url":"https://github.com/Automattic/babble/issues/247#issuecomment-128668853","issue_url":"https://api.github.com/repos/Automattic/babble/issues/247","id":128668853,"user":{"login":"simonwheatley","id":233434,"avatar_url":"https://avatars.githubusercontent.com/u/233434?v=3","gravatar_id":"","url":"https://api.github.com/users/simonwheatley","html_url":"https://github.com/simonwheatley","followers_url":"https://api.github.com/users/simonwheatley/followers","following_url":"https://api.github.com/users/simonwheatley/following{/other_user}","gists_url":"https://api.github.com/users/simonwheatley/gists{/gist_id}","starred_url":"https://api.github.com/users/simonwheatley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonwheatley/subscriptions","organizations_url":"https://api.github.com/users/simonwheatley/orgs","repos_url":"https://api.github.com/users/simonwheatley/repos","events_url":"https://api.github.com/users/simonwheatley/events{/privacy}","received_events_url":"https://api.github.com/users/simonwheatley/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T10:32:41Z","updated_at":"2015-08-07T10:32:41Z","body":"Closed in #301 "}}