I am facing an issue in umbraco which i would appreciate if anyone can help me.
I am new to the umbraco world and i have been into a project where umbraco has been used extensively. My issue is - I created a document type, and added a node of that type in the content (it is not exactly under the root node it is like Content > en-US > MyNewNode).
Now I am accessing from my c#code and trying to retrieve the root as Node(-1), which is giving me the entire structure of tree but my new node is not comming.
For any hint you might require - connection string in web.config is pointing correctly, i had published the node.
Can anyone please help me to resolve this ? Thank you.
Firstly it might help to post your C# code so we can see what's happening.
The other thing to check is that if the node is actually published, you can check this by looking at you /App_Data/umbraco.config file this is the 'published' data that the Umbraco front end uses and depending on how you're accessing code this could be the problem.
Also please post a image on your content tree as it will help.
Rich, I found the issue. Actually i found the correct umbraco.config it was in the /data folder. I removed it and then published, then i got my nodes in there and also from the code. Thank you very much. I was not at all aware of this config file. I though the data might be retrieved from database everytime. I have one more question which is on a specific requirement. I am raising it as a different post as i want to mark this as answered. The new post is with title - "Radiobutton list of child nodes". It would be great if you can have a look into that.
New nodes are not being retrieved
Hi All,
I am facing an issue in umbraco which i would appreciate if anyone can help me.
I am new to the umbraco world and i have been into a project where umbraco has been used extensively.
My issue is - I created a document type, and added a node of that type in the content (it is not exactly under the root node it is like Content > en-US > MyNewNode).
Now I am accessing from my c#code and trying to retrieve the root as Node(-1), which is giving me the entire structure of tree but my new node is not comming.
For any hint you might require - connection string in web.config is pointing correctly, i had published the node.
Can anyone please help me to resolve this ? Thank you.
Hey Rony,
Welcome to the Umbraco forum!
Firstly it might help to post your C# code so we can see what's happening.
The other thing to check is that if the node is actually published, you can check this by looking at you /App_Data/umbraco.config file this is the 'published' data that the Umbraco front end uses and depending on how you're accessing code this could be the problem.
Also please post a image on your content tree as it will help.
Regards
Rich
Hi Rich, Thanks for the response.
Regarding the C# code the root node is being retrieved as -
var rootNode = UmbracoHelpers.GetRootNode();
And in the UmbracoHelpers - GetRootNode is nothing but return new Node(-1);
I dont see any config file in the app_data. But the connection strings are at my web.config.
Thanks,
Rony
Rich, I found the issue. Actually i found the correct umbraco.config it was in the /data folder. I removed it and then published, then i got my nodes in there and also from the code. Thank you very much. I was not at all aware of this config file. I though the data might be retrieved from database everytime. I have one more question which is on a specific requirement. I am raising it as a different post as i want to mark this as answered. The new post is with title - "Radiobutton list of child nodes". It would be great if you can have a look into that.
is working on a reply...