Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jan 27, 2010 @ 17:39
    Nik Wahlberg
    0

    Pages not being published

    Hi all,

    I have this wierd thing happening where I parse a text file to create nodes and publish them. The problem I am having is that the nodes "appear" to be published when the process is complete, but they are not viewable on the Web site. So, I know they are published becuase the node has a URL and it has an unpublish button available. Additionally, I can list the various nodes (using @nodeName) in a page in order to link to them. However, when I click a page in the list (output by xslt macro) I get a blank white screen. This is until I go to manually publish the node and then I can see the content. 

    The parser and publish code looks like this:

    ...
    //Set props
    policeDoc.getProperty("SubSite").Value = police.SubSite;
    policeDoc.getProperty("Title").Value = police.Title;
    policeDoc.getProperty("Urn").Value = police.Urn;
    policeDoc.getProperty("Description").Value = police.Description;
    policeDoc.getProperty("Content").Value = police.Content;
    
    //Publish the node
    policeDoc.Publish(author);
    
    //Tell umbraco to publish the document
    library.UpdateDocumentCache(policeDoc.Id);
    ...

    Anyone have any ideas?? I'm stuck in limbo here... :) 

    Thanks,
    Nik

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jan 27, 2010 @ 17:44
    Peter Dijksterhuis
    0

    Hi Nik,

    Try adding a policeDoc.Save(); right before the policeDoc.Publish

    HTH,

    Peter

     

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jan 27, 2010 @ 17:44
    Nik Wahlberg
    0

    CORRECTION: The "Link to Document" awlays seems to be empty, even when I do a manual publish. This is 4.0.2.1 on Win 2003. 

    Thanks!

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jan 27, 2010 @ 17:45
    Nik Wahlberg
    0

    Hi Peter, thanks. I will try that. 

    -- Nik

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jan 27, 2010 @ 17:56
    Nik Wahlberg
    0

    No dice, and I don't do that on other API calls as the set of properties saves it immediately (I think). Man, I am seeing some strange behavior now. It appears that I can't even see the pages when doing a manual publish....hmmm

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jan 27, 2010 @ 18:46
    Nik Wahlberg
    0

    Ok, it seems that I had some template issue here as opposed to a publishing problem. So, I deleted umbraco.config and re-ran my content parser and all is well. The umbrac.config was pointing to template="0" (which is obviously incorrect). 

    Thanks for your help!

    -- Nik

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jan 27, 2010 @ 20:03
    Nik Wahlberg
    0

    G** Damnit! Now it's back to template="0" again! Has anyone seen this in the past?

    Thanks,
    Nik

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jan 27, 2010 @ 20:16
    Peter Dijksterhuis
    0

    Do you have a default-template defined for the document-type your creating?

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jan 27, 2010 @ 20:31
    Nik Wahlberg
    0

    Yeah, it's set to the right one?? 

  • 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.

Please Sign in or register to post replies