I'd write out the value of @Model.CSection before 'doing the split' to see what it contains...
When you copied the EN site, the CSection Multinode TreePicker would have contained a comma delimited string of the picked node Ids, perhaps for Node 1, Node 2, Node 3
But the copied versions of the site would have created new Node Id's for Node 1, Node 2 and Node 3, underneath CY and ES - however the value of the Multinode Treepicker CSection wouldn't automatically update with these new node Id values.
What you might need to do, is re-pick the nodes underneath each new language and republish, to reflect the updated ids...
... but writing out what the value contains before the split will give a good clue as to the cause of the error.
Yes, I have try to print out the value of node ID before split and it was with comma (some thing like 1802,1803) , And I have also try removed all the code after Split(',') but it was giving error.
It, Gives error when I select 2 node Item , but when I select 3 node then it start working !! – BJ Patel 19 hours ag
Split giving error in Umbraco razor in multilingual site in umbrac 7
I am having following node structure
_Parent Site (Main site)
EN (English Site)
CY (wales site)
I have copy all node of EN to other two site. (So all the contain of all node are same )
I have use "Multinode Treepicker" as CSection for selecting node as shown in following code.
The above code workings fine when rending EN site. but gives error while rendering CY and ES site. (As all site are having same value)
I found that Following line gives error. for (CY and ES site)
Am I missing any thing ? ,I am not able to make it out at all I am using umbraco 7.2.6
Hi BJ
I'd write out the value of @Model.CSection before 'doing the split' to see what it contains...
When you copied the EN site, the CSection Multinode TreePicker would have contained a comma delimited string of the picked node Ids, perhaps for Node 1, Node 2, Node 3
But the copied versions of the site would have created new Node Id's for Node 1, Node 2 and Node 3, underneath CY and ES - however the value of the Multinode Treepicker CSection wouldn't automatically update with these new node Id values.
What you might need to do, is re-pick the nodes underneath each new language and republish, to reflect the updated ids...
... but writing out what the value contains before the split will give a good clue as to the cause of the error.
Yes, I have try to print out the value of node ID before split and it was with comma (some thing like 1802,1803) , And I have also try removed all the code after Split(',') but it was giving error.
It, Gives error when I select 2 node Item , but when I select 3 node then it start working !! – BJ Patel 19 hours ag
is working on a reply...