{"action":"opened","issue":{"url":"https://api.github.com/repos/polylang/polylang/issues/79","repository_url":"https://api.github.com/repos/polylang/polylang","labels_url":"https://api.github.com/repos/polylang/polylang/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/polylang/polylang/issues/79/comments","events_url":"https://api.github.com/repos/polylang/polylang/issues/79/events","html_url":"https://github.com/polylang/polylang/issues/79","id":196044672,"number":79,"title":"Featured listings issue with WP Job Manager and Polylang","user":{"login":"sv1cec","id":23484039,"avatar_url":"https://avatars.githubusercontent.com/u/23484039?v=3","gravatar_id":"","url":"https://api.github.com/users/sv1cec","html_url":"https://github.com/sv1cec","followers_url":"https://api.github.com/users/sv1cec/followers","following_url":"https://api.github.com/users/sv1cec/following{/other_user}","gists_url":"https://api.github.com/users/sv1cec/gists{/gist_id}","starred_url":"https://api.github.com/users/sv1cec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sv1cec/subscriptions","organizations_url":"https://api.github.com/users/sv1cec/orgs","repos_url":"https://api.github.com/users/sv1cec/repos","events_url":"https://api.github.com/users/sv1cec/events{/privacy}","received_events_url":"https://api.github.com/users/sv1cec/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-16T12:02:51Z","updated_at":"2016-12-16T12:02:51Z","closed_at":null,"body":"In my site, we use WP, Polylang, Listify, WP Job Manager, FacetWP. We have noticed the following strange behaviour. \r\n\r\nI have three listings (posts), which are translations of the same listing, Initially, they are all NOT featured. Their post_ids are 2472, 2473, 2474. In the database, I can verify that the menu_order field for all three listings is set to 0. Also, the _featured meta_key for all these posts is set to 0.  \r\n\r\nI use wp-admin to change the first listing (English, post_id 2472) to Featured. I can see in the database that the menu_order field for the English listing is set to -1 and the meta_key _featured is set to 1. (so far so good)\r\n\r\nI then select the Greek translation of the listing (post_id 2473) and I also check the Featured checkbox for the Greek listing. In the database, I can see that the meta_key _featured for both the English and the Greek versions are now set to 1. HOWEVER, the menu_order for the English listing (post_id 2472) is set to 0, while the menu_order for the Greek listing (post_id 2473) is set to -1. In other words, for some reason, while the Greek post gets the correct value for menu_order, at the same time, the English post menu_order is changed from its correct value of -1 to 0.\r\n\r\nIf I now select the French translation (post_id 2474) and check the Featured checkbox for it, then the menu_order in my listings change for the French transalation, from 0 to -1 (as it should), but also it changes from -1 to 0, for the Greek translation. \r\n\r\nIn other words, initially:\r\n\r\npost_id: 2472  menu_order: 0  meta_key _featured: 0\r\npost_id: 2473  menu_order: 0  meta_key _featured: 0\r\npost_id: 2474  menu_order: 0  meta_key _featured: 0\r\n\r\nAfter checking the Featured checkbox for 2472, things change as:\r\n\r\npost_id: 2472  menu_order: -1  meta_key _featured: 1\r\npost_id: 2473  menu_order: 0  meta_key _featured: 0\r\npost_id: 2474  menu_order: 0  meta_key _featured: 0\r\n\r\nAfter checking the Featured checkbox for 2473, things change as:\r\n\r\npost_id: 2472  menu_order: 0  meta_key _featured: 1\r\npost_id: 2473  menu_order: -1  meta_key _featured: 1\r\npost_id: 2474  menu_order: 0  meta_key _featured: 0\r\n\r\nAfter checking the Featured checkbox for 2474, things change as:\r\n\r\npost_id: 2472  menu_order: 0  meta_key _featured: 1\r\npost_id: 2473  menu_order: 0  meta_key _featured: 1\r\npost_id: 2474  menu_order: -1  meta_key _featured: 1\r\n\r\nRight now, all posts show the Featured checkbox as checked. \r\n\r\nIf I now uncheck the Featured checkbox from one of the listings (say I uncheck it for post_id 2474), another interesting thing happens. \r\n\r\nThe contents of the database change to:\r\n\r\npost_id: 2472  menu_order: -1  meta_key _featured: 1\r\npost_id: 2473  menu_order: -1  meta_key _featured: 1\r\npost_id: 2474  menu_order: 0  meta_key _featured: 0\r\n\r\nWhich seens to indicate that the program checks for the meta_key _featured and sets the menu_order to -1 for those posts which have _featured = 1 (which makes sense). \r\n\r\nIn other words, if I change the Featured checkbox of a listing, from checked to unchecked, the program checks for the _featured meta_key and sets the menu_order field properly, for all three listings. If I change the Featured checkbox from unchecked to checked, the program does not check for the _featured meta_key and resets the menu_order field to 0, for the other two posts.\r\n\r\n"}}
{"actor":{"display_login":"sv1cec"}}