xRM-Portals-Community-Edition
xRM-Portals-Community-Edition copied to clipboard
Portal Name - is it needed? Can we force context to refresh in code? Cache is not refreshed on Forum Creation
Hello,
Through the code we see that Portal Name is null and it looks to be an important parameter since it is used to create Portal Context and then to get the Context=PortalContext.ServiceContext
if we look into Form.aspx.cs file we see that Portal Name is pulled from Language Code and it is 1033
here are the snapshots of the code:

and then it fails the if condition because the name is expected to be: "Xrm"

and one more question, is it possible to force context to refresh in the code?
thank you
and then it fails the if condition because the name is expected to be: "Xrm"
Is something not working properly due to the way this code works right now? What is the scenario where this template is being used?
is it possible to force context to refresh in the code?
What context are you referring to, and why do you want to refresh it?
Hi,
This is just one of many examples where the use of PortalName isn't defined. We have an issue where the portal is incapable of finding a newly created forum unless we navigated to _service/about and clear the Cache, or restart the IIS web server. While attempting to debug, we noticed that the context used to retrieve the forums doesn't retrieve the most recent forums, we also noticed that the portal name being passed around to create the context is null. Example:
- Create a forum from the portal (We have a bilingual portal)
- Attempt to navigate to that forums page
- Receive page not found error
- Restart the portal or clear the cache then go back to step 2 and it works
We've identified that in the file ForumSiteMapProvider.cs at line 142, the context fails to retrieve any newly created forum nodes unless we clear cache or restart the website. Consequently line 145 returns null.
Just to add: Forums are included in Web Notifications