{"action":"created","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-widgets/issues/172","repository_url":"https://api.github.com/repos/silverstripe/silverstripe-widgets","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-widgets/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-widgets/issues/172/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-widgets/issues/172/events","html_url":"https://github.com/silverstripe/silverstripe-widgets/issues/172","id":339213015,"node_id":"MDU6SXNzdWUzMzkyMTMwMTU=","number":172,"title":"WidgetAreaID SQL error when adding WidgetArea to a child of Page","user":{"login":"muppsy007","id":108191,"node_id":"MDQ6VXNlcjEwODE5MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/108191?v=4","gravatar_id":"","url":"https://api.github.com/users/muppsy007","html_url":"https://github.com/muppsy007","followers_url":"https://api.github.com/users/muppsy007/followers","following_url":"https://api.github.com/users/muppsy007/following{/other_user}","gists_url":"https://api.github.com/users/muppsy007/gists{/gist_id}","starred_url":"https://api.github.com/users/muppsy007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muppsy007/subscriptions","organizations_url":"https://api.github.com/users/muppsy007/orgs","repos_url":"https://api.github.com/users/muppsy007/repos","events_url":"https://api.github.com/users/muppsy007/events{/privacy}","received_events_url":"https://api.github.com/users/muppsy007/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-07-08T09:55:27Z","updated_at":"2018-07-12T20:58:41Z","closed_at":"2018-07-08T21:31:59Z","author_association":"NONE","body":"I've installed the module 1.x on SS 3.6 and done a successful dev/build. Now trying to add a widget area to a child class of Page.php as follows:\r\n\r\n```\r\nclass MyPage extends Page\r\n{\r\n\r\n    private static $has_one = [\r\n        \"MyWidgetArea\" => \"WidgetArea\"\r\n    ];\r\n\r\n}\r\n```\r\n\r\nWhen I do a dev/build after adding this, I get the following SQL error (truncated for brevity)\r\n\r\n> SS_DatabaseException thrown with message \"Couldn't run query:\r\n> \r\n> SELECT DISTINCT \"SiteTree\".\"ClassName\", \"SiteTree\".\"LastEdited\", .... , \"Page\".\"PreviewImageID\",  \"MyPage\".\"MyWidgetAreaID\", \"SiteTree\".\"ID\", \r\n>             CASE WHEN \"SiteTree\".\"ClassName\" IS NOT NULL THEN \"SiteTree\".\"ClassName\"\r\n>             ELSE 'SiteTree' END AS \"RecordClassName\"\r\n> FROM \"SiteTree\"\r\n> LEFT JOIN \"Page\" ON \"Page\".\"ID\" = \"SiteTree\".\"ID\"\r\n> LEFT JOIN \"MyPage\" ON \"MyPage\".\"ID\" = \"SiteTree\".\"ID\"\r\n> WHERE (\"SiteTree\".\"ClassName\" IN (?))\r\n> ORDER BY \"SiteTree\".\"Sort\" ASC\r\n> LIMIT 1\r\n> \r\n> 42S22-1054: Unknown column 'MyPage.MyWidgetAreaID' in 'field list'\"\r\n> \r\n\r\nWhat have I done wrong?\r\n"},"comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-widgets/issues/comments/404648657","html_url":"https://github.com/silverstripe/silverstripe-widgets/issues/172#issuecomment-404648657","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-widgets/issues/172","id":404648657,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDY0ODY1Nw==","user":{"login":"NightJar","id":778003,"node_id":"MDQ6VXNlcjc3ODAwMw==","avatar_url":"https://avatars2.githubusercontent.com/u/778003?v=4","gravatar_id":"","url":"https://api.github.com/users/NightJar","html_url":"https://github.com/NightJar","followers_url":"https://api.github.com/users/NightJar/followers","following_url":"https://api.github.com/users/NightJar/following{/other_user}","gists_url":"https://api.github.com/users/NightJar/gists{/gist_id}","starred_url":"https://api.github.com/users/NightJar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NightJar/subscriptions","organizations_url":"https://api.github.com/users/NightJar/orgs","repos_url":"https://api.github.com/users/NightJar/repos","events_url":"https://api.github.com/users/NightJar/events{/privacy}","received_events_url":"https://api.github.com/users/NightJar/received_events","type":"User","site_admin":false},"created_at":"2018-07-12T20:58:41Z","updated_at":"2018-07-12T20:58:41Z","author_association":"CONTRIBUTOR","body":"Thanks for reporting back @muppsy007, it's great to hear you were able to resolve the issue! :)"}}
{"actor":{"display_login":"NightJar"}}