Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon Dingley 1474 posts 3431 karma points c-trib
    Oct 19, 2016 @ 16:19
    Simon Dingley
    0

    Cannot modify a PublishedContentRequest once it is read-only (v7.5.3)

    Did anything change in regards to how we should implement IContentFinders in the latest version? An upgraded site is returning the following exception:

    Cannot modify a PublishedContentRequest once it is read-only
    

    This was the implementation:

    contentRequest.PublishedContent = awardWinnerNode;
    contentRequest.SetTemplate(organisationTemplate);
    contentRequest.ConfigureRequest();
    

    But I noticed that contentRequest.ConfigureRequest() is now obsolete and so that has been updated to contentRequest.Prepare() but the error is still present.

    Any help or direction would be appreciated.

    Cheers, Simon

  • Yakov Lebski 587 posts 2340 karma points
    Oct 19, 2016 @ 17:59
    Yakov Lebski
    101

    Are you sure that contentRequest.ConfigureRequest()/ontentRequest.Prepare() is required? ,I think it's will call automatically

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Oct 19, 2016 @ 18:44
    Simon Dingley
    0

    @Yakov you are correct it seems. Thank you.

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Oct 19, 2016 @ 18:14
    Simon Dingley
    0

    Following a comment from @zpqrtbnk on Twitter I removed contentRequest.Prepare() and the error has gone!

    The previous implementation has been there for so long I can't recall why we were originally calling contentRequest.ConfigureRequest() however I have a bit more testing to do but it seems to now be resolved.

    @Stephen, if you can clarify with an answer as to why the contentRequest.Prepare() isn't needed I will mark it as the solution, thanks.

Please Sign in or register to post replies

Write your reply to:

Draft