{"action":"created","issue":{"url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/issues/366","repository_url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x","labels_url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/issues/366/labels{/name}","comments_url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/issues/366/comments","events_url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/issues/366/events","html_url":"https://github.com/qTranslate-Team/qtranslate-x/issues/366","id":143205799,"number":366,"title":"new tag created with wrong slug","user":{"login":"picasso","id":399395,"avatar_url":"https://avatars.githubusercontent.com/u/399395?v=3","gravatar_id":"","url":"https://api.github.com/users/picasso","html_url":"https://github.com/picasso","followers_url":"https://api.github.com/users/picasso/followers","following_url":"https://api.github.com/users/picasso/following{/other_user}","gists_url":"https://api.github.com/users/picasso/gists{/gist_id}","starred_url":"https://api.github.com/users/picasso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/picasso/subscriptions","organizations_url":"https://api.github.com/users/picasso/orgs","repos_url":"https://api.github.com/users/picasso/repos","events_url":"https://api.github.com/users/picasso/events{/privacy}","received_events_url":"https://api.github.com/users/picasso/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":54,"created_at":"2016-03-24T10:08:45Z","updated_at":"2016-07-08T17:42:06Z","closed_at":null,"body":"The problem is the following:\r\n\r\nI have tags which are linked to post with custom type (in my case 'movie').\r\n\r\nFor example tag with Name\r\n\r\n[:en]Barolo[:ru]Бароло[:]\r\n\r\nand with Slug in English\r\n\r\nbarolo\r\n\r\nWhen I change something in my post with this tag (the content for example) and then update it\r\n\r\n- if my WordPress Admin interface is English everything is OK.\r\n- if my WordPress Admin interface is Russian then a new tag created with the same Name ([:en]Barolo[:ru]Бароло[:]) but with Slug in Russian (Бароло). Old tag with English slug (barolo) is unlinked from the post and the new tag with Russian slug is linked.\r\n\r\nCould you check it? It's very annoying to re-check all tags and delete/relink them..."},"comment":{"url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/issues/comments/231424693","html_url":"https://github.com/qTranslate-Team/qtranslate-x/issues/366#issuecomment-231424693","issue_url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/issues/366","id":231424693,"user":{"login":"picasso","id":399395,"avatar_url":"https://avatars.githubusercontent.com/u/399395?v=3","gravatar_id":"","url":"https://api.github.com/users/picasso","html_url":"https://github.com/picasso","followers_url":"https://api.github.com/users/picasso/followers","following_url":"https://api.github.com/users/picasso/following{/other_user}","gists_url":"https://api.github.com/users/picasso/gists{/gist_id}","starred_url":"https://api.github.com/users/picasso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/picasso/subscriptions","organizations_url":"https://api.github.com/users/picasso/orgs","repos_url":"https://api.github.com/users/picasso/repos","events_url":"https://api.github.com/users/picasso/events{/privacy}","received_events_url":"https://api.github.com/users/picasso/received_events","type":"User","site_admin":false},"created_at":"2016-07-08T17:42:06Z","updated_at":"2016-07-08T17:42:06Z","body":"John, what I found so far:\r\n\r\n- I call function `get_the_tags()`\r\n- it leads to call of `get_the_terms() at [/wp-includes/category-template.php]`\r\n\r\nand in `get_the_terms` data will be fetched from the cache or from the database if it is not available from cache. And it's not a 3rd-party plugin - it's a regular WP algorithm.\r\n```\r\nfunction get_the_terms( $post, $taxonomy ) {\r\n\tif ( ! $post = get_post( $post ) )\r\n\t\treturn false;\r\n\r\n\t$terms = get_object_term_cache( $post->ID, $taxonomy );\r\n\tif ( false === $terms ) {\r\n\t\t$terms = wp_get_object_terms( $post->ID, $taxonomy );\r\n```\r\n\r\nand then - it is a matter of chance.\r\nOn the same page there are a lot of calls to this function - WPSEO_OpenGraph, post_class () and so on.\r\nIf in the cache will be stored variant of the Russian language - that is, with name 'Бароло' - then everything will work out well. If it will be stored into the cache with the English name - all the breaks (because in `option` table a translation stored with Russian name as key).\r\n\r\nI do not know what to do and how prevent it..."}}
{"actor":{"display_login":"picasso"}}