-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes issue with the IVirtualPageController not setting PublishedRequest content via FindContent #15121
Conversation
Hi there @justin-nevitech, thank you for this contribution! 👍 While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
Just a note, the issue mentions this is a problem in v10, v11, and v12 so it will need backporting. |
Hi @justin-nevitech, Thanks for your PR to fix #12834, where the One of the Core Collaborators team will review this as soon as possible 👍 Best wishes Emma |
Any update on this pease as this is blocking us on the development of a new website? |
Hi @bergmania - could you take a look and see if this can be checked and merged please? |
This one is on me, not on Bjarke. Sorry for the delay! As initial feedback I would say that you can't update the constructur of a public method on a public class as that is a breaking change. So if a different approach can be taken with that feedback in mind we can have a look at it! |
Note to @benbracedigital - apparently there's a workaround so it should remove your blocker: #12834 (comment) |
Hi @nul800sebastiaan - thanks for the feedback, I will try and take another look when I have some time. |
Hey @nul800sebastiaan. I've re-worked my solution based on your feedback. Could you review please? |
Sorry for the slow reply here, I like the solution, and it works like a charm 🚀 |
…est content via FindContent (#15121) * Fixes issue #12834 * Re-worked based on feedback * Use dependency injection * Only call new constructor --------- Co-authored-by: Nikolaj Geisle <[email protected]> (cherry picked from commit fd9c1a0)
Cherry picked for 13.6 🚀 |
Prerequisites
If there's an existing issue for this PR then this fixes #12834
Description
This fixes an issue with the IUmbracoContextAccessor.PublishedRequest.PublishedContent not being set when a page is requested via an IVirtualPageController.
The issue (#12834) has a comment from Kenn Jacobsen (#12834 (comment)) which recreates the issue and you can see the PublishedContent via the UmbracoContext is null. With this fix the PublishedRequest is set from the content returned from IVirtualPageController FindContent method. Use Ken's code from the issue to test this.
I have also followed the tests outlined in #13103 to ensure that existing functionality regarding virtual page controllers works as expected (as there are some comprehensive test scenarios in that PR).
All tests have been run and passed.