Nodes appear twice in content menu with the same id
I have a staging enviroment where some of the top nodes appear twice in the tree and with the same id
Ive tried to republish the entire site and also recycle the app pool.
This might somehow be realated to change of properties on the document types of the nodes in question which then has been couried over from a development enviroment. Also note how the node name is duplciated twice in the name string
hmm, well, that sounds more like caching issue in the tree then, as nodes cannot have the same ID, as its an identity column in the DB.
I think if you double click the content icon in the section tray, it should force a reload of the tree from the DB, instead of from clients-side cache as it does now.
Or try reloading the nodes with the context menu.
Next step would be to look in the database to determine if there are dublicate entries, but that should completely destroy the site if there were (in most cases atleast)
The error stemmed from GetChildrenForTree() in the Document class in bussinesslogic.web
where a SQL query is shot off to get the children for the content tree menu.
That query returned dublicate entries due to an error in the [cmsDocumentType] table where the [IsDefault] field was set to true in two rows. Something that
should not happen as I understand it. Setting the [IsDefault] to the right one solved the issue.
Nodes appear twice in content menu with the same id
I have a staging enviroment where some of the top nodes appear twice in the tree and with the same id
Ive tried to republish the entire site and also recycle the app pool.
This might somehow be realated to change of properties on the document types of the nodes in question which then has been couried over from a development enviroment. Also note how the node name is duplciated twice in the name string
The site renders fine.
Any suggestions why they appear twice?
Hi Kristian,
I haven't experienced this, but whenever this kind of thing happens to me, I delete App_Data/TEMP/ClientDependency folder.
At this point the website is down, so if that matters don't do it. :D
Then Start > Run > iisreset
Usually whatever crazy stuff I was seeing in the back end is fixed after that.
It might not fix your issue, but that is the first thing I would try.
Hi Dan.
That did not do the trick :-(
Thanks for the suggestio though
Hi Kristian
If you hold the mouse over the nodes in the tree, do they have the same ID? or different ones?
/per
They have the same ID's
hmm, well, that sounds more like caching issue in the tree then, as nodes cannot have the same ID, as its an identity column in the DB.
I think if you double click the content icon in the section tray, it should force a reload of the tree from the DB, instead of from clients-side cache as it does now.
Or try reloading the nodes with the context menu.
Next step would be to look in the database to determine if there are dublicate entries, but that should completely destroy the site if there were (in most cases atleast)
/per
That was also my initial thought.
Reloading the content tree does not make them disappear though.
What query should I try and run on the DB ?
Not sure why it happend but here is the solution:
The error stemmed from GetChildrenForTree() in the Document class in bussinesslogic.web
where a SQL query is shot off to get the children for the content tree menu.
That query returned dublicate entries due to an error in the [cmsDocumentType] table where the [IsDefault] field was set to true in two rows. Something that
should not happen as I understand it. Setting the [IsDefault] to the right one solved the issue.
is working on a reply...