{"action":"created","issue":{"url":"https://api.github.com/repos/getblocklab/block-lab/issues/181","repository_url":"https://api.github.com/repos/getblocklab/block-lab","labels_url":"https://api.github.com/repos/getblocklab/block-lab/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/getblocklab/block-lab/issues/181/comments","events_url":"https://api.github.com/repos/getblocklab/block-lab/issues/181/events","html_url":"https://github.com/getblocklab/block-lab/issues/181","id":386368960,"node_id":"MDU6SXNzdWUzODYzNjg5NjA=","number":181,"title":"Field \"Select\": Different values in Gutenberg preview (array) / Website preview (string)","user":{"login":"greenphp","id":827658,"node_id":"MDQ6VXNlcjgyNzY1OA==","avatar_url":"https://avatars0.githubusercontent.com/u/827658?v=4","gravatar_id":"","url":"https://api.github.com/users/greenphp","html_url":"https://github.com/greenphp","followers_url":"https://api.github.com/users/greenphp/followers","following_url":"https://api.github.com/users/greenphp/following{/other_user}","gists_url":"https://api.github.com/users/greenphp/gists{/gist_id}","starred_url":"https://api.github.com/users/greenphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenphp/subscriptions","organizations_url":"https://api.github.com/users/greenphp/orgs","repos_url":"https://api.github.com/users/greenphp/repos","events_url":"https://api.github.com/users/greenphp/events{/privacy}","received_events_url":"https://api.github.com/users/greenphp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-11-30T22:08:52Z","updated_at":"2018-12-06T12:16:45Z","closed_at":"2018-12-06T12:16:45Z","author_association":"NONE","body":"(I found this issue in the **no-mock-attributes branch**. #180 - Not sure, if it's also in the develop branch.)\r\n\r\nLooks like there is a small problem with the return values of the select fields.\r\n\r\nI get different data via \"Gutenberg preview\" (array) and \"Website preview\" (string).\r\n\r\n### Steps to Reproduce\r\n\r\n1. Create a publisher \"select\" field. The choices are:\r\n\r\n```\r\npub-a : Publisher A\r\npub-b : Publisher B\r\npub-c : Publisher C\r\n```\r\n\r\n2. Create PHP template with this code:\r\n\r\n```\r\n<?php\r\necho \"publisher: \";\r\nvar_dump(block_value( 'publisher' ));\r\n?>\r\n\r\n```\r\n3. Select the first publisher from the dropdown.\r\n\r\n4. Output in \"Gutenberg preview\":\r\n\r\n`publisher: array(1) { [0]=> string(5) \"pub-a\"}`\r\n\r\n5. Output in \"Website preview\":\r\n\r\n`publisher: string(5) „pub-a“`\r\n\r\n**Expected behavior:** \r\n\r\nstring(5) „pub-a“ should be the output in both, Gutenberg and Website preview.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/getblocklab/block-lab/issues/comments/444852296","html_url":"https://github.com/getblocklab/block-lab/issues/181#issuecomment-444852296","issue_url":"https://api.github.com/repos/getblocklab/block-lab/issues/181","id":444852296,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDg1MjI5Ng==","user":{"login":"lukecarbis","id":1097667,"node_id":"MDQ6VXNlcjEwOTc2Njc=","avatar_url":"https://avatars2.githubusercontent.com/u/1097667?v=4","gravatar_id":"","url":"https://api.github.com/users/lukecarbis","html_url":"https://github.com/lukecarbis","followers_url":"https://api.github.com/users/lukecarbis/followers","following_url":"https://api.github.com/users/lukecarbis/following{/other_user}","gists_url":"https://api.github.com/users/lukecarbis/gists{/gist_id}","starred_url":"https://api.github.com/users/lukecarbis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukecarbis/subscriptions","organizations_url":"https://api.github.com/users/lukecarbis/orgs","repos_url":"https://api.github.com/users/lukecarbis/repos","events_url":"https://api.github.com/users/lukecarbis/events{/privacy}","received_events_url":"https://api.github.com/users/lukecarbis/received_events","type":"User","site_admin":false},"created_at":"2018-12-06T12:16:45Z","updated_at":"2018-12-06T12:16:45Z","author_association":"MEMBER","body":"Resolved in #185."}}
{"actor":{"display_login":"lukecarbis"}}