I checked the database, and the tables CMSCONTENT and CMSCONTENTXML only has the nodeId once per table.
And if I check the App_Data/Umbraco.config, there is only one if each node aswell.
However the CMSCONTENTVERSION table has several version of the nodes. But that counts for other nodes aswell, so I guess that is something with different versions of the same node or something like that. But when I see the VERSIONDATE in this table, it (2011-02-27 02:33:59). Can this be the problem.. maybe it created a create version and a publish version in the same second or something?!
So far I found out that it must be in this line the mistake is made.
newPage.Publish(User.GetUser(0));
If I quote this line out, I cant get Umbraco to make a dublicate node. But now a have a lot of nodes wich is not published, and I want them to be published...
Well thank you sir. Actually I don't think that we are getting karma points when getting marked as the solution (only when people gives you a high five:) ), but thanks anyway.
It's pretty strange that you have to insert a pause before publishing the node though. But if it works it's great right :)
Creating a new Node with MakeNew() = two of the same node?!
Hi,
I have used Niels' example from the Umbraco TV, on how to create a new content node through a usercontrol.
Here's my code:
It works an everything. But when i reload my node tree sometimes it has created two of the same node. With the same name, and the same id...
Can somebody tell what I do wrong here? :-)
Regards
Peter
Not sure if this is related, but I've also got some problems with double node names: http://our.umbraco.org/forum/core/general/17462-Missing-nodes-in-backend
Jeroen
Hi there Peter
Could you try to change the last line from this:
to this:
/Kim A
Hi Kim,
I tried that now. And tried with a if(!isPostBack) also... But nothing does the trick. I also tried to give the nodeName a unique name...
Here's my code now:
Any other suggestions? :-)
/Peter
Ahh okay, then I don't know what's going on. Sorry. Let's hope someone else have got a suggestion to whats wrong.
/Kim A
Im doing this in the latest Juno version.. 4.6.1.. Dont know if it has anything to say?!
Okay, it's monday and we are all back in the office.
Somebody who can give me some directions of what I am doing wrong here? :)
Hi pedn,
Out of curiousity: are you running Umbraco on a MySQL server? :)
Hi Bo,
Yes I am. Can that have anything to do with it? :-)
Okay,
I checked the database, and the tables CMSCONTENT and CMSCONTENTXML only has the nodeId once per table.
And if I check the App_Data/Umbraco.config, there is only one if each node aswell.
However the CMSCONTENTVERSION table has several version of the nodes. But that counts for other nodes aswell, so I guess that is something with different versions of the same node or something like that. But when I see the VERSIONDATE in this table, it (2011-02-27 02:33:59). Can this be the problem.. maybe it created a create version and a publish version in the same second or something?!
/Peter
So far I found out that it must be in this line the mistake is made.
If I quote this line out, I cant get Umbraco to make a dublicate node. But now a have a lot of nodes wich is not published, and I want them to be published...
What to do?
Well.. It looks like I was right about the VERSIONDATE..
Found this thread:
http://our.umbraco.org/projects/collaboration/blog-4-umbraco/using-blog-4-umbraco/8901-Content-tree-lists-nodes-multiple-times
People seems to experience the same thing with Juno..
Okay so now I solved my problem by creating pause in the code before it publish, so the VERSIONDATE is a second newer in the published version.
So heres my new code:
This worked for me. I set this as solved, and Kim you helped me the most, so you get the karma points :-)
Thanks again..
/Peter
Well thank you sir. Actually I don't think that we are getting karma points when getting marked as the solution (only when people gives you a high five:) ), but thanks anyway.
It's pretty strange that you have to insert a pause before publishing the node though. But if it works it's great right :)
/Kim A
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.