{"action":"created","issue":{"url":"https://api.github.com/repos/SubPointSolutions/spmeta2/issues/788","repository_url":"https://api.github.com/repos/SubPointSolutions/spmeta2","labels_url":"https://api.github.com/repos/SubPointSolutions/spmeta2/issues/788/labels{/name}","comments_url":"https://api.github.com/repos/SubPointSolutions/spmeta2/issues/788/comments","events_url":"https://api.github.com/repos/SubPointSolutions/spmeta2/issues/788/events","html_url":"https://github.com/SubPointSolutions/spmeta2/issues/788","id":135175025,"number":788,"title":"Provisioning publishing page throws null reference exception","user":{"login":"leolorenzoluis","id":15150044,"avatar_url":"https://avatars.githubusercontent.com/u/15150044?v=3","gravatar_id":"","url":"https://api.github.com/users/leolorenzoluis","html_url":"https://github.com/leolorenzoluis","followers_url":"https://api.github.com/users/leolorenzoluis/followers","following_url":"https://api.github.com/users/leolorenzoluis/following{/other_user}","gists_url":"https://api.github.com/users/leolorenzoluis/gists{/gist_id}","starred_url":"https://api.github.com/users/leolorenzoluis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leolorenzoluis/subscriptions","organizations_url":"https://api.github.com/users/leolorenzoluis/orgs","repos_url":"https://api.github.com/users/leolorenzoluis/repos","events_url":"https://api.github.com/users/leolorenzoluis/events{/privacy}","received_events_url":"https://api.github.com/users/leolorenzoluis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SubPointSolutions/spmeta2/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/SubPointSolutions/spmeta2/labels/community-feedback","name":"community-feedback","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"SubPointSupport","id":8142869,"avatar_url":"https://avatars.githubusercontent.com/u/8142869?v=3","gravatar_id":"","url":"https://api.github.com/users/SubPointSupport","html_url":"https://github.com/SubPointSupport","followers_url":"https://api.github.com/users/SubPointSupport/followers","following_url":"https://api.github.com/users/SubPointSupport/following{/other_user}","gists_url":"https://api.github.com/users/SubPointSupport/gists{/gist_id}","starred_url":"https://api.github.com/users/SubPointSupport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SubPointSupport/subscriptions","organizations_url":"https://api.github.com/users/SubPointSupport/orgs","repos_url":"https://api.github.com/users/SubPointSupport/repos","events_url":"https://api.github.com/users/SubPointSupport/events{/privacy}","received_events_url":"https://api.github.com/users/SubPointSupport/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/SubPointSolutions/spmeta2/milestones/93","html_url":"https://github.com/SubPointSolutions/spmeta2/milestones/SPMeta2%201.2.60,%20February%202016","labels_url":"https://api.github.com/repos/SubPointSolutions/spmeta2/milestones/93/labels","id":1480296,"number":93,"title":"SPMeta2 1.2.60, February 2016","description":"","creator":{"login":"SubPointSupport","id":8142869,"avatar_url":"https://avatars.githubusercontent.com/u/8142869?v=3","gravatar_id":"","url":"https://api.github.com/users/SubPointSupport","html_url":"https://github.com/SubPointSupport","followers_url":"https://api.github.com/users/SubPointSupport/followers","following_url":"https://api.github.com/users/SubPointSupport/following{/other_user}","gists_url":"https://api.github.com/users/SubPointSupport/gists{/gist_id}","starred_url":"https://api.github.com/users/SubPointSupport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SubPointSupport/subscriptions","organizations_url":"https://api.github.com/users/SubPointSupport/orgs","repos_url":"https://api.github.com/users/SubPointSupport/repos","events_url":"https://api.github.com/users/SubPointSupport/events{/privacy}","received_events_url":"https://api.github.com/users/SubPointSupport/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":2,"state":"open","created_at":"2016-01-02T07:20:10Z","updated_at":"2016-02-21T08:31:13Z","due_on":"2016-02-21T13:00:00Z","closed_at":null},"comments":3,"created_at":"2016-02-21T07:40:37Z","updated_at":"2016-02-22T17:06:03Z","closed_at":null,"body":"Running the given example from [here](http://docs.subpointsolutions.com/spmeta2/definitions/sharepoint-standard/PublishingPageDefinition/#Adding with custom layout)\r\n\r\n```\r\nvar customPublishing = new PublishingPageDefinition\r\n    {\r\n        Title = \"Custom publishing\",\r\n        FileName = \"Custom-publishing.aspx\",\r\n        PageLayoutFileName = \"__ specify a publishing page layout file name here ___\"\r\n    };\r\n \r\n    var model = SPMeta2Model.NewWebModel(web =>\r\n    {\r\n        web.AddHostList(BuiltInListDefinitions.Pages, list =>\r\n        {\r\n            list\r\n                .AddPublishingPage(customPublishing);\r\n        });\r\n    });\r\n```\r\n\r\nthrows an exception\r\n\r\n> SPMeta2.Exceptions.SPMeta2ModelDeploymentException: There was an error while pro\r\nvisioning definition. Check ModelNode prop. ---> System.NullReferenceException:\r\nObject reference not set to an instance of an object.\r\n   at SPMeta2.SSOM.Standard.ModelHandlers.PublishingPageModelHandler.<>c__Displa\r\nyClass8.<DeployPublishingPage>b__7(SPFile afterFile)\r\n   at SPMeta2.SSOM.ModelHandlers.ModuleFileModelHandler.WithSafeFileOperation(SP\r\nList list, SPFolder folder, String fileUrl, String fileName, Byte[] fileContent,\r\n Boolean overide, Action`1 onBeforeAction, Action`1 onAction)\r\n   at SPMeta2.SSOM.Standard.ModelHandlers.PublishingPageModelHandler.DeployPubli\r\nshingPage(Object modelHost, SPList list, SPFolder folder, PublishingPageDefiniti\r\non publishingPageModel)\r\n   at SPMeta2.SSOM.Standard.ModelHandlers.PublishingPageModelHandler.DeployModel\r\n(Object modelHost, DefinitionBase model)\r\n   at SPMeta2.Services.Impl.DefaultModelTreeTraverseService.Traverse(Object mode\r\nlHost, ModelNode modelNode)\r\n   --- End of inner exception stack trace ---\r\n   at SPMeta2.Services.Impl.DefaultModelTreeTraverseService.Traverse(Object mode\r\nlHost, ModelNode modelNode)\r\n   at SPMeta2.Services.Impl.DefaultModelTreeTraverseService.<>c__DisplayClass6.<\r\nTraverse>b__4(Object childModelHost)\r\n   at SPMeta2.SSOM.ModelHandlers.ListModelHandler.WithResolvingModelHost(ModelHo\r\nstResolveContext modelHostContext)\r\n   at SPMeta2.Services.Impl.DefaultModelTreeTraverseService.Traverse(Object mode\r\nlHost, ModelNode modelNode)\r\n   at SPMeta2.Services.Impl.DefaultModelTreeTraverseService.<>c__DisplayClass6.<\r\nTraverse>b__4(Object childModelHost)\r\n   at SPMeta2.SSOM.ModelHandlers.WebModelHandler.WithResolvingModelHost(ModelHos\r\ntResolveContext modelHostContext)\r\n   at SPMeta2.Services.Impl.DefaultModelTreeTraverseService.Traverse(Object mode\r\nlHost, ModelNode modelNode)\r\n   at SPMeta2.Services.ModelServiceBase.ProcessModelDeployment(Object modelHost,\r\n ModelNode modelNode)\r\n   at SPMeta2.Services.ModelServiceBase.DeployModel(ModelHostBase modelHost, Mod\r\nelNode model)\r\n   at SPMeta2.SSOM.Services.SSOMProvisionService.DeployModel(ModelHostBase model\r\nHost, ModelNode model)\r\n   at SPMeta2.SSOM.Services.SSOMProvisionServiceExtensions.DeployWebModel(SSOMPr\r\novisionService modelHost, SPWeb web, ModelNode model)"},"comment":{"url":"https://api.github.com/repos/SubPointSolutions/spmeta2/issues/comments/187270517","html_url":"https://github.com/SubPointSolutions/spmeta2/issues/788#issuecomment-187270517","issue_url":"https://api.github.com/repos/SubPointSolutions/spmeta2/issues/788","id":187270517,"user":{"login":"leolorenzoluis","id":15150044,"avatar_url":"https://avatars.githubusercontent.com/u/15150044?v=3","gravatar_id":"","url":"https://api.github.com/users/leolorenzoluis","html_url":"https://github.com/leolorenzoluis","followers_url":"https://api.github.com/users/leolorenzoluis/followers","following_url":"https://api.github.com/users/leolorenzoluis/following{/other_user}","gists_url":"https://api.github.com/users/leolorenzoluis/gists{/gist_id}","starred_url":"https://api.github.com/users/leolorenzoluis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leolorenzoluis/subscriptions","organizations_url":"https://api.github.com/users/leolorenzoluis/orgs","repos_url":"https://api.github.com/users/leolorenzoluis/repos","events_url":"https://api.github.com/users/leolorenzoluis/events{/privacy}","received_events_url":"https://api.github.com/users/leolorenzoluis/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T17:06:03Z","updated_at":"2016-02-22T17:06:03Z","body":"I did. I missed the extension file name of the file. \r\n\r\nI had to do something like \"PageLayout.aspx\". I was expecting \".aspx\" is taken care for me. Assuming I didn't provide the file extension, then the wrapper model should take care of it. It is most likely a page layout template that is being used and will end with \".aspx\" and it can't be .html or any other file extension. Unless I am missing a different use case?"}}