{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/4989","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/4989/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/4989/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/4989/events","html_url":"https://github.com/WordPress/gutenberg/issues/4989","id":296125412,"node_id":"MDU6SXNzdWUyOTYxMjU0MTI=","number":4989,"title":"Validation fails if attribute is persisted to post content & meta.","user":{"login":"Shelob9","id":1994311,"node_id":"MDQ6VXNlcjE5OTQzMTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1994311?v=4","gravatar_id":"","url":"https://api.github.com/users/Shelob9","html_url":"https://github.com/Shelob9","followers_url":"https://api.github.com/users/Shelob9/followers","following_url":"https://api.github.com/users/Shelob9/following{/other_user}","gists_url":"https://api.github.com/users/Shelob9/gists{/gist_id}","starred_url":"https://api.github.com/users/Shelob9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shelob9/subscriptions","organizations_url":"https://api.github.com/users/Shelob9/orgs","repos_url":"https://api.github.com/users/Shelob9/repos","events_url":"https://api.github.com/users/Shelob9/events{/privacy}","received_events_url":"https://api.github.com/users/Shelob9/received_events","type":"User","site_admin":false},"labels":[{"id":570263070,"node_id":"MDU6TGFiZWw1NzAyNjMwNzA=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/Blocks","name":"Blocks","color":"fbca04","default":false},{"id":531680823,"node_id":"MDU6TGFiZWw1MzE2ODA4MjM=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Type]%20Bug","name":"[Type] Bug","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":{"login":"aduth","id":1779930,"node_id":"MDQ6VXNlcjE3Nzk5MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1779930?v=4","gravatar_id":"","url":"https://api.github.com/users/aduth","html_url":"https://github.com/aduth","followers_url":"https://api.github.com/users/aduth/followers","following_url":"https://api.github.com/users/aduth/following{/other_user}","gists_url":"https://api.github.com/users/aduth/gists{/gist_id}","starred_url":"https://api.github.com/users/aduth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduth/subscriptions","organizations_url":"https://api.github.com/users/aduth/orgs","repos_url":"https://api.github.com/users/aduth/repos","events_url":"https://api.github.com/users/aduth/events{/privacy}","received_events_url":"https://api.github.com/users/aduth/received_events","type":"User","site_admin":false},"assignees":[{"login":"aduth","id":1779930,"node_id":"MDQ6VXNlcjE3Nzk5MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1779930?v=4","gravatar_id":"","url":"https://api.github.com/users/aduth","html_url":"https://github.com/aduth","followers_url":"https://api.github.com/users/aduth/followers","following_url":"https://api.github.com/users/aduth/following{/other_user}","gists_url":"https://api.github.com/users/aduth/gists{/gist_id}","starred_url":"https://api.github.com/users/aduth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduth/subscriptions","organizations_url":"https://api.github.com/users/aduth/orgs","repos_url":"https://api.github.com/users/aduth/repos","events_url":"https://api.github.com/users/aduth/events{/privacy}","received_events_url":"https://api.github.com/users/aduth/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/WordPress/gutenberg/milestones/70","html_url":"https://github.com/WordPress/gutenberg/milestone/70","labels_url":"https://api.github.com/repos/WordPress/gutenberg/milestones/70/labels","id":3734039,"node_id":"MDk6TWlsZXN0b25lMzczNDAzOQ==","number":70,"title":"WordPress 5.x","description":"Tasks to be done for a major WordPress release in the near to medium term.","creator":{"login":"mtias","id":548849,"node_id":"MDQ6VXNlcjU0ODg0OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/548849?v=4","gravatar_id":"","url":"https://api.github.com/users/mtias","html_url":"https://github.com/mtias","followers_url":"https://api.github.com/users/mtias/followers","following_url":"https://api.github.com/users/mtias/following{/other_user}","gists_url":"https://api.github.com/users/mtias/gists{/gist_id}","starred_url":"https://api.github.com/users/mtias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtias/subscriptions","organizations_url":"https://api.github.com/users/mtias/orgs","repos_url":"https://api.github.com/users/mtias/repos","events_url":"https://api.github.com/users/mtias/events{/privacy}","received_events_url":"https://api.github.com/users/mtias/received_events","type":"User","site_admin":false},"open_issues":240,"closed_issues":78,"state":"open","created_at":"2018-10-12T14:46:17Z","updated_at":"2019-04-01T23:58:56Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2018-02-10T19:15:12Z","updated_at":"2019-04-05T18:24:38Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"If a block saves markup with a representation of an attribute in HTML and that same attribute as meta, block validation fails. The meta is saved, the markup is good in post content, block validation fails.\r\n\r\n## Issue Overview\r\nConsider this requirement for a block:\r\n1) Must save completely valid HTML markup to post content that, when the client has no JavaScript, is totally human and machine (assistive devices, search engines, etc) readable, and can be progressively enhanced by front-end JavaScript/CSS.\r\n2) The fields represented in that HTML markup  should be queryable in the database.\r\n\r\nRequirement 1 is provided by a Gutenberg static HTML block and requirement 2 is satisfied by the WordPress Meta API if the field is saved as post meta.\r\n\r\nIn my mind, saving an attribute as post meta, and static HTML representing its value in a semantic, human readable form is best for front-end requirements -- accessibility, no JS fallbacks, SEO, the philosophy of progressive enhancement -- and back-end needs -- we need to query by field data and update field data.\r\n\r\nBTW I'm aware that this duplicates data. Given that we have a hook that runs after post meta is updated and we have a function for converting attributes to static HTML, that should be solvable.\r\n\r\n## Steps to Reproduce (for bugs)\r\n1. [Register a block with a meta attribute and register the meta field](https://gist.github.com/Shelob9/d0cdd75ee6479691e92f993ee1470842#file-block-php)\r\n2. [Create block edit function  so that you can edit attribute and see that setAttributes is updating state correctly](https://gist.github.com/Shelob9/d0cdd75ee6479691e92f993ee1470842#file-block-js-L9-L32). \r\n3.[Create block save function that for a non-meta attribute ](https://gist.github.com/Shelob9/d0cdd75ee6479691e92f993ee1470842#file-block-js-L33-L38). \r\n\r\n\r\n## Expected Behavior\r\nNo validation error.\r\n\r\n## Current Behavior\r\nBlock validation fails.\r\n\r\n## Possible Solution\r\nI think the problem here is it's being parsed as if it's a an attribute being stored in markup/normal serialization, but I'm not sure. If so, can that be disabled in these situations? \r\n\r\n## Screenshots / Video\r\n![screen shot 2018-02-10 at 2 07 12 pm](https://user-images.githubusercontent.com/1994311/36065705-8c2a905e-0e6c-11e8-8517-4999c7e77a63.png)\r\n![screen shot 2018-02-10 at 2 07 30 pm](https://user-images.githubusercontent.com/1994311/36065706-8f3fa2c0-0e6c-11e8-9ab8-7f49e5fe8720.png)\r\n## Related Issues and/or PRs\r\n<!-- List related issues or PRs against other branches -->\r\n\r\n## Todos\r\n- [ ] Tests\r\n- [ ] Documentation\r\n"},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/480376349","html_url":"https://github.com/WordPress/gutenberg/issues/4989#issuecomment-480376349","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/4989","id":480376349,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4MDM3NjM0OQ==","user":{"login":"Horttcore","id":503252,"node_id":"MDQ6VXNlcjUwMzI1Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/503252?v=4","gravatar_id":"","url":"https://api.github.com/users/Horttcore","html_url":"https://github.com/Horttcore","followers_url":"https://api.github.com/users/Horttcore/followers","following_url":"https://api.github.com/users/Horttcore/following{/other_user}","gists_url":"https://api.github.com/users/Horttcore/gists{/gist_id}","starred_url":"https://api.github.com/users/Horttcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Horttcore/subscriptions","organizations_url":"https://api.github.com/users/Horttcore/orgs","repos_url":"https://api.github.com/users/Horttcore/repos","events_url":"https://api.github.com/users/Horttcore/events{/privacy}","received_events_url":"https://api.github.com/users/Horttcore/received_events","type":"User","site_admin":false},"created_at":"2019-04-05T18:24:38Z","updated_at":"2019-04-05T18:24:38Z","author_association":"NONE","body":"When will this be fixed? I mean this is some serious bug and makes meta attributes useless"}}
{"actor":{"display_login":"Horttcore"}}