“the UmbracoHelper was constructed with an UmbracoContext and the current request is not a front-end...
I'm trying to implement ajax pagination using Umbraco.
On the server side, I have the following:
[System.Web.Http.HttpGet]
public JsonResult pagination(int? page)
{
IEnumerable<IPublishedContent> newsPosts = Umbraco.AssignedContentItem.DescendantOrSelf("news").Children.Where(x => x.IsVisible() && x.DocumentTypeAlias == "newsPost").OrderByDescending(x => x.UpdateDate).Take(5);
//from here on we will be returning the json within which information required for displaying post entries in carousel is included.
string json = "[some random string]"; //just random string for now.
return Json(json, JsonRequestBehavior.AllowGet);
}
As you can see, I'm trying to get necessary data from IPublishedContents, but I'm having trouble instantiating this series of IPublishedContents.
And this is the error I'm getting when I access:
locahost:{port}/umbraco/surface/{controller}/pagination on Chrome.
Cannot return the IPublishedContent because the UmbracoHelper was constructed with an UmbracoContext and the current request is not a front-end request.
Details: System.InvalidOperationException: Cannot return the IPublishedContent because the UmbracoHelper was constructed with an UmbracoContext and the current request is not a front-end request.
As I said, I'm making this request from Chrome, which is I think means this request is from the front end, so I'm not sure why I'm getting this error.
In the course of searching I found these
1) our.umbraco.com forum
2) stackoverflow post
- is deserted with no answer, and as for 2, it strikes me that the answer is not quite relevant to my case. I want to instantiate IPublishedContent in the first place.
Mine is Umbraco 7.
and could it be possible to tell me why requests from the front-end are not desirable?
Any hint would be highly appreciated.
Thanks,
ajax pagination umbraco
add a comment |
I'm trying to implement ajax pagination using Umbraco.
On the server side, I have the following:
[System.Web.Http.HttpGet]
public JsonResult pagination(int? page)
{
IEnumerable<IPublishedContent> newsPosts = Umbraco.AssignedContentItem.DescendantOrSelf("news").Children.Where(x => x.IsVisible() && x.DocumentTypeAlias == "newsPost").OrderByDescending(x => x.UpdateDate).Take(5);
//from here on we will be returning the json within which information required for displaying post entries in carousel is included.
string json = "[some random string]"; //just random string for now.
return Json(json, JsonRequestBehavior.AllowGet);
}
As you can see, I'm trying to get necessary data from IPublishedContents, but I'm having trouble instantiating this series of IPublishedContents.
And this is the error I'm getting when I access:
locahost:{port}/umbraco/surface/{controller}/pagination on Chrome.
Cannot return the IPublishedContent because the UmbracoHelper was constructed with an UmbracoContext and the current request is not a front-end request.
Details: System.InvalidOperationException: Cannot return the IPublishedContent because the UmbracoHelper was constructed with an UmbracoContext and the current request is not a front-end request.
As I said, I'm making this request from Chrome, which is I think means this request is from the front end, so I'm not sure why I'm getting this error.
In the course of searching I found these
1) our.umbraco.com forum
2) stackoverflow post
- is deserted with no answer, and as for 2, it strikes me that the answer is not quite relevant to my case. I want to instantiate IPublishedContent in the first place.
Mine is Umbraco 7.
and could it be possible to tell me why requests from the front-end are not desirable?
Any hint would be highly appreciated.
Thanks,
ajax pagination umbraco
if you spotted my answer saying "all I needed to do was to create a new instance of...", please forget it, I thought I did it but realised it was because I just commented out a crucial line
– tofu
Nov 19 '18 at 9:59
Does your controller inherit from Surface?
– Jabberwocky
Nov 21 '18 at 9:46
add a comment |
I'm trying to implement ajax pagination using Umbraco.
On the server side, I have the following:
[System.Web.Http.HttpGet]
public JsonResult pagination(int? page)
{
IEnumerable<IPublishedContent> newsPosts = Umbraco.AssignedContentItem.DescendantOrSelf("news").Children.Where(x => x.IsVisible() && x.DocumentTypeAlias == "newsPost").OrderByDescending(x => x.UpdateDate).Take(5);
//from here on we will be returning the json within which information required for displaying post entries in carousel is included.
string json = "[some random string]"; //just random string for now.
return Json(json, JsonRequestBehavior.AllowGet);
}
As you can see, I'm trying to get necessary data from IPublishedContents, but I'm having trouble instantiating this series of IPublishedContents.
And this is the error I'm getting when I access:
locahost:{port}/umbraco/surface/{controller}/pagination on Chrome.
Cannot return the IPublishedContent because the UmbracoHelper was constructed with an UmbracoContext and the current request is not a front-end request.
Details: System.InvalidOperationException: Cannot return the IPublishedContent because the UmbracoHelper was constructed with an UmbracoContext and the current request is not a front-end request.
As I said, I'm making this request from Chrome, which is I think means this request is from the front end, so I'm not sure why I'm getting this error.
In the course of searching I found these
1) our.umbraco.com forum
2) stackoverflow post
- is deserted with no answer, and as for 2, it strikes me that the answer is not quite relevant to my case. I want to instantiate IPublishedContent in the first place.
Mine is Umbraco 7.
and could it be possible to tell me why requests from the front-end are not desirable?
Any hint would be highly appreciated.
Thanks,
ajax pagination umbraco
I'm trying to implement ajax pagination using Umbraco.
On the server side, I have the following:
[System.Web.Http.HttpGet]
public JsonResult pagination(int? page)
{
IEnumerable<IPublishedContent> newsPosts = Umbraco.AssignedContentItem.DescendantOrSelf("news").Children.Where(x => x.IsVisible() && x.DocumentTypeAlias == "newsPost").OrderByDescending(x => x.UpdateDate).Take(5);
//from here on we will be returning the json within which information required for displaying post entries in carousel is included.
string json = "[some random string]"; //just random string for now.
return Json(json, JsonRequestBehavior.AllowGet);
}
As you can see, I'm trying to get necessary data from IPublishedContents, but I'm having trouble instantiating this series of IPublishedContents.
And this is the error I'm getting when I access:
locahost:{port}/umbraco/surface/{controller}/pagination on Chrome.
Cannot return the IPublishedContent because the UmbracoHelper was constructed with an UmbracoContext and the current request is not a front-end request.
Details: System.InvalidOperationException: Cannot return the IPublishedContent because the UmbracoHelper was constructed with an UmbracoContext and the current request is not a front-end request.
As I said, I'm making this request from Chrome, which is I think means this request is from the front end, so I'm not sure why I'm getting this error.
In the course of searching I found these
1) our.umbraco.com forum
2) stackoverflow post
- is deserted with no answer, and as for 2, it strikes me that the answer is not quite relevant to my case. I want to instantiate IPublishedContent in the first place.
Mine is Umbraco 7.
and could it be possible to tell me why requests from the front-end are not desirable?
Any hint would be highly appreciated.
Thanks,
ajax pagination umbraco
ajax pagination umbraco
edited Nov 16 '18 at 5:19
tofu
asked Nov 16 '18 at 4:56
tofutofu
46
46
if you spotted my answer saying "all I needed to do was to create a new instance of...", please forget it, I thought I did it but realised it was because I just commented out a crucial line
– tofu
Nov 19 '18 at 9:59
Does your controller inherit from Surface?
– Jabberwocky
Nov 21 '18 at 9:46
add a comment |
if you spotted my answer saying "all I needed to do was to create a new instance of...", please forget it, I thought I did it but realised it was because I just commented out a crucial line
– tofu
Nov 19 '18 at 9:59
Does your controller inherit from Surface?
– Jabberwocky
Nov 21 '18 at 9:46
if you spotted my answer saying "all I needed to do was to create a new instance of...", please forget it, I thought I did it but realised it was because I just commented out a crucial line
– tofu
Nov 19 '18 at 9:59
if you spotted my answer saying "all I needed to do was to create a new instance of...", please forget it, I thought I did it but realised it was because I just commented out a crucial line
– tofu
Nov 19 '18 at 9:59
Does your controller inherit from Surface?
– Jabberwocky
Nov 21 '18 at 9:46
Does your controller inherit from Surface?
– Jabberwocky
Nov 21 '18 at 9:46
add a comment |
2 Answers
2
active
oldest
votes
Perhaps easier to use web api
Create a controller which inherits from UmbracoApiController
public class PagedItemsController : UmbracoApiController
{
[HttpGet]
[ActionName("list")] //Optional see note below
public IHttpActionResult GetItems([FromUri] int pageNo = 1)
{
// Next you need some way of getting the items you need.
// I would not return the whole IPublishedContent items. Rather query those and then use linq Select to transform into a more relevant smaller class (not doing this here)
// I've just included this for brevity
var items = _itemService.GetPagedItems(pageNo);
// Now return the results
return Ok(items);
}
}
Calls to endpoints in Umbraco follow the format
/umbraco/api/{controller}/{endpoint}
With the [ActionName("list")]
above the call to the GetItems
method will be
http://example.com/umbraco/api/PagedItems/list?pageNo=3
Without the ActionName attribute the call would be
http://exampe.com/umbraco/api/PagedItems/GetItems?pageNo=3
With a standard jquery ajax call this will return json without needing to serialise.
thanks for the answer, but I still cannot instantiate ipublishedcontents within the controller. Getting the same, "the Umbraco Helper was constructed with an..." error. // Next you need some way of getting the items you need. // I would not return the whole IPublishedContent items. Rather query those and then use linq Select to transform into a more relevant smaller class (not doing this here) =>would be great if you could give me a little bit more details (parameters and property names can be just a mock, but would like actual methods. thanks,
– tofu
Nov 19 '18 at 9:17
So are you trying to call this endpoint by putting the url in Chrome address bar? Does your endpoint return anything if you don't include the calls to Umbraco methods?
– wingyip
Nov 19 '18 at 11:43
thanks for all the information, (1) I'm not intending to use the browser to see the result of my controller, so I get your point. (2) I was having trouble with the instantiation of Umbraco Helper, and it turns out I should've done "TypedContent" instead of "AssignedContentItem" (I didn't provide enough information, so it's my fault)
– tofu
Nov 28 '18 at 6:43
add a comment |
Try getting your node this way.
var umbracoHelper = new Umbraco.Web.UmbracoHelper(Umbraco.Web.UmbracoContext.Current);
var yourNode = umbracoHelper.TypedContentAtXPath("umbracoPathtoYourNode");
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53331681%2fthe-umbracohelper-was-constructed-with-an-umbracocontext-and-the-current-reques%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Perhaps easier to use web api
Create a controller which inherits from UmbracoApiController
public class PagedItemsController : UmbracoApiController
{
[HttpGet]
[ActionName("list")] //Optional see note below
public IHttpActionResult GetItems([FromUri] int pageNo = 1)
{
// Next you need some way of getting the items you need.
// I would not return the whole IPublishedContent items. Rather query those and then use linq Select to transform into a more relevant smaller class (not doing this here)
// I've just included this for brevity
var items = _itemService.GetPagedItems(pageNo);
// Now return the results
return Ok(items);
}
}
Calls to endpoints in Umbraco follow the format
/umbraco/api/{controller}/{endpoint}
With the [ActionName("list")]
above the call to the GetItems
method will be
http://example.com/umbraco/api/PagedItems/list?pageNo=3
Without the ActionName attribute the call would be
http://exampe.com/umbraco/api/PagedItems/GetItems?pageNo=3
With a standard jquery ajax call this will return json without needing to serialise.
thanks for the answer, but I still cannot instantiate ipublishedcontents within the controller. Getting the same, "the Umbraco Helper was constructed with an..." error. // Next you need some way of getting the items you need. // I would not return the whole IPublishedContent items. Rather query those and then use linq Select to transform into a more relevant smaller class (not doing this here) =>would be great if you could give me a little bit more details (parameters and property names can be just a mock, but would like actual methods. thanks,
– tofu
Nov 19 '18 at 9:17
So are you trying to call this endpoint by putting the url in Chrome address bar? Does your endpoint return anything if you don't include the calls to Umbraco methods?
– wingyip
Nov 19 '18 at 11:43
thanks for all the information, (1) I'm not intending to use the browser to see the result of my controller, so I get your point. (2) I was having trouble with the instantiation of Umbraco Helper, and it turns out I should've done "TypedContent" instead of "AssignedContentItem" (I didn't provide enough information, so it's my fault)
– tofu
Nov 28 '18 at 6:43
add a comment |
Perhaps easier to use web api
Create a controller which inherits from UmbracoApiController
public class PagedItemsController : UmbracoApiController
{
[HttpGet]
[ActionName("list")] //Optional see note below
public IHttpActionResult GetItems([FromUri] int pageNo = 1)
{
// Next you need some way of getting the items you need.
// I would not return the whole IPublishedContent items. Rather query those and then use linq Select to transform into a more relevant smaller class (not doing this here)
// I've just included this for brevity
var items = _itemService.GetPagedItems(pageNo);
// Now return the results
return Ok(items);
}
}
Calls to endpoints in Umbraco follow the format
/umbraco/api/{controller}/{endpoint}
With the [ActionName("list")]
above the call to the GetItems
method will be
http://example.com/umbraco/api/PagedItems/list?pageNo=3
Without the ActionName attribute the call would be
http://exampe.com/umbraco/api/PagedItems/GetItems?pageNo=3
With a standard jquery ajax call this will return json without needing to serialise.
thanks for the answer, but I still cannot instantiate ipublishedcontents within the controller. Getting the same, "the Umbraco Helper was constructed with an..." error. // Next you need some way of getting the items you need. // I would not return the whole IPublishedContent items. Rather query those and then use linq Select to transform into a more relevant smaller class (not doing this here) =>would be great if you could give me a little bit more details (parameters and property names can be just a mock, but would like actual methods. thanks,
– tofu
Nov 19 '18 at 9:17
So are you trying to call this endpoint by putting the url in Chrome address bar? Does your endpoint return anything if you don't include the calls to Umbraco methods?
– wingyip
Nov 19 '18 at 11:43
thanks for all the information, (1) I'm not intending to use the browser to see the result of my controller, so I get your point. (2) I was having trouble with the instantiation of Umbraco Helper, and it turns out I should've done "TypedContent" instead of "AssignedContentItem" (I didn't provide enough information, so it's my fault)
– tofu
Nov 28 '18 at 6:43
add a comment |
Perhaps easier to use web api
Create a controller which inherits from UmbracoApiController
public class PagedItemsController : UmbracoApiController
{
[HttpGet]
[ActionName("list")] //Optional see note below
public IHttpActionResult GetItems([FromUri] int pageNo = 1)
{
// Next you need some way of getting the items you need.
// I would not return the whole IPublishedContent items. Rather query those and then use linq Select to transform into a more relevant smaller class (not doing this here)
// I've just included this for brevity
var items = _itemService.GetPagedItems(pageNo);
// Now return the results
return Ok(items);
}
}
Calls to endpoints in Umbraco follow the format
/umbraco/api/{controller}/{endpoint}
With the [ActionName("list")]
above the call to the GetItems
method will be
http://example.com/umbraco/api/PagedItems/list?pageNo=3
Without the ActionName attribute the call would be
http://exampe.com/umbraco/api/PagedItems/GetItems?pageNo=3
With a standard jquery ajax call this will return json without needing to serialise.
Perhaps easier to use web api
Create a controller which inherits from UmbracoApiController
public class PagedItemsController : UmbracoApiController
{
[HttpGet]
[ActionName("list")] //Optional see note below
public IHttpActionResult GetItems([FromUri] int pageNo = 1)
{
// Next you need some way of getting the items you need.
// I would not return the whole IPublishedContent items. Rather query those and then use linq Select to transform into a more relevant smaller class (not doing this here)
// I've just included this for brevity
var items = _itemService.GetPagedItems(pageNo);
// Now return the results
return Ok(items);
}
}
Calls to endpoints in Umbraco follow the format
/umbraco/api/{controller}/{endpoint}
With the [ActionName("list")]
above the call to the GetItems
method will be
http://example.com/umbraco/api/PagedItems/list?pageNo=3
Without the ActionName attribute the call would be
http://exampe.com/umbraco/api/PagedItems/GetItems?pageNo=3
With a standard jquery ajax call this will return json without needing to serialise.
answered Nov 17 '18 at 10:02
wingyipwingyip
2,12921636
2,12921636
thanks for the answer, but I still cannot instantiate ipublishedcontents within the controller. Getting the same, "the Umbraco Helper was constructed with an..." error. // Next you need some way of getting the items you need. // I would not return the whole IPublishedContent items. Rather query those and then use linq Select to transform into a more relevant smaller class (not doing this here) =>would be great if you could give me a little bit more details (parameters and property names can be just a mock, but would like actual methods. thanks,
– tofu
Nov 19 '18 at 9:17
So are you trying to call this endpoint by putting the url in Chrome address bar? Does your endpoint return anything if you don't include the calls to Umbraco methods?
– wingyip
Nov 19 '18 at 11:43
thanks for all the information, (1) I'm not intending to use the browser to see the result of my controller, so I get your point. (2) I was having trouble with the instantiation of Umbraco Helper, and it turns out I should've done "TypedContent" instead of "AssignedContentItem" (I didn't provide enough information, so it's my fault)
– tofu
Nov 28 '18 at 6:43
add a comment |
thanks for the answer, but I still cannot instantiate ipublishedcontents within the controller. Getting the same, "the Umbraco Helper was constructed with an..." error. // Next you need some way of getting the items you need. // I would not return the whole IPublishedContent items. Rather query those and then use linq Select to transform into a more relevant smaller class (not doing this here) =>would be great if you could give me a little bit more details (parameters and property names can be just a mock, but would like actual methods. thanks,
– tofu
Nov 19 '18 at 9:17
So are you trying to call this endpoint by putting the url in Chrome address bar? Does your endpoint return anything if you don't include the calls to Umbraco methods?
– wingyip
Nov 19 '18 at 11:43
thanks for all the information, (1) I'm not intending to use the browser to see the result of my controller, so I get your point. (2) I was having trouble with the instantiation of Umbraco Helper, and it turns out I should've done "TypedContent" instead of "AssignedContentItem" (I didn't provide enough information, so it's my fault)
– tofu
Nov 28 '18 at 6:43
thanks for the answer, but I still cannot instantiate ipublishedcontents within the controller. Getting the same, "the Umbraco Helper was constructed with an..." error. // Next you need some way of getting the items you need. // I would not return the whole IPublishedContent items. Rather query those and then use linq Select to transform into a more relevant smaller class (not doing this here) =>would be great if you could give me a little bit more details (parameters and property names can be just a mock, but would like actual methods. thanks,
– tofu
Nov 19 '18 at 9:17
thanks for the answer, but I still cannot instantiate ipublishedcontents within the controller. Getting the same, "the Umbraco Helper was constructed with an..." error. // Next you need some way of getting the items you need. // I would not return the whole IPublishedContent items. Rather query those and then use linq Select to transform into a more relevant smaller class (not doing this here) =>would be great if you could give me a little bit more details (parameters and property names can be just a mock, but would like actual methods. thanks,
– tofu
Nov 19 '18 at 9:17
So are you trying to call this endpoint by putting the url in Chrome address bar? Does your endpoint return anything if you don't include the calls to Umbraco methods?
– wingyip
Nov 19 '18 at 11:43
So are you trying to call this endpoint by putting the url in Chrome address bar? Does your endpoint return anything if you don't include the calls to Umbraco methods?
– wingyip
Nov 19 '18 at 11:43
thanks for all the information, (1) I'm not intending to use the browser to see the result of my controller, so I get your point. (2) I was having trouble with the instantiation of Umbraco Helper, and it turns out I should've done "TypedContent" instead of "AssignedContentItem" (I didn't provide enough information, so it's my fault)
– tofu
Nov 28 '18 at 6:43
thanks for all the information, (1) I'm not intending to use the browser to see the result of my controller, so I get your point. (2) I was having trouble with the instantiation of Umbraco Helper, and it turns out I should've done "TypedContent" instead of "AssignedContentItem" (I didn't provide enough information, so it's my fault)
– tofu
Nov 28 '18 at 6:43
add a comment |
Try getting your node this way.
var umbracoHelper = new Umbraco.Web.UmbracoHelper(Umbraco.Web.UmbracoContext.Current);
var yourNode = umbracoHelper.TypedContentAtXPath("umbracoPathtoYourNode");
add a comment |
Try getting your node this way.
var umbracoHelper = new Umbraco.Web.UmbracoHelper(Umbraco.Web.UmbracoContext.Current);
var yourNode = umbracoHelper.TypedContentAtXPath("umbracoPathtoYourNode");
add a comment |
Try getting your node this way.
var umbracoHelper = new Umbraco.Web.UmbracoHelper(Umbraco.Web.UmbracoContext.Current);
var yourNode = umbracoHelper.TypedContentAtXPath("umbracoPathtoYourNode");
Try getting your node this way.
var umbracoHelper = new Umbraco.Web.UmbracoHelper(Umbraco.Web.UmbracoContext.Current);
var yourNode = umbracoHelper.TypedContentAtXPath("umbracoPathtoYourNode");
answered Nov 23 '18 at 9:18
Sindri Már SigfussonSindri Már Sigfusson
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53331681%2fthe-umbracohelper-was-constructed-with-an-umbracocontext-and-the-current-reques%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
if you spotted my answer saying "all I needed to do was to create a new instance of...", please forget it, I thought I did it but realised it was because I just commented out a crucial line
– tofu
Nov 19 '18 at 9:59
Does your controller inherit from Surface?
– Jabberwocky
Nov 21 '18 at 9:46