Copied to clipboard

Flag this post as spam?

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


  • Stuart Burrows 61 posts 110 karma points
    Jan 21, 2011 @ 10:25
    Stuart Burrows
    1

    Creating and publishing a new blog post via the editor

    Hi all,

    I've recently installed blog 4 umbraco into umbraco v 4.6.1 and it is working great except for a few niggles.

    My main concern at the moment is that if I create a new blog post via the dashboard you can't publish that post without a yellow screen of death displaying ('object not set to an instance of an object'). This seems to be because the package is trying to categorise the post using the DateFolder document type.

    Am I doing something wrong here?

    The steps I take:

    1. Right click on the blog and create a new node with the blog post document type.
    2. Enter my content and click save (saves correctly)
    3. Click publish and the right side of the screen shows the error
    4. Click save again and the tree is reloaded
    5. Navigate to a newly created folder structure which makes up todays date and the blog post is now saved there.
    6. Publish and it works fine!
    Any help = greatly appreciated
    Thanks!

  • Tom Smith 98 posts 172 karma points
    Jan 21, 2011 @ 16:54
    Tom Smith
    0

    Hi Stuart,

    Your steps are spot on - no faults there,

    What does the stack trace look like when it throws the YSOD!?

    Many Thanks,

    Tom

  • Stuart Burrows 61 posts 110 karma points
    Jan 24, 2011 @ 10:45
    Stuart Burrows
    0

    Hi Tom,

    Thanks for the reply, glad I am on the right track!

    Here is the stack trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.library.niceUrlJuno(Int32 nodeId, Int32 startNodeDepth, String currentDomain) +225
       umbraco.library.niceUrlDo(Int32 nodeID, Int32 startNodeDepth) +259
       Umlaut.Umb.Blog.EventHandlers.Autoping.Document_AfterPublish(Document sender, PublishEventArgs e) +564
       umbraco.cms.businesslogic.web.Document.PublishWithResult(User u) +1577
       umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e) +413
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +133
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +164
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3690

  • Tom Smith 98 posts 172 karma points
    Jan 24, 2011 @ 11:10
    Tom Smith
    4

    Hi Stuart,

    I have a funny feeling I've run into this one before;

    The problem occurs when the blog4umbraco core automatically attempts to ping blog directories after a post / blog text page is published. This ping method isn't compatible with Umbraco 4.5.2, or Juno (4.6.1) it appears (as the way in which publish works has changed).

    To make sure that this is the problem, try removing the Services to ping (pingServices) definition from the blog doctype. Remember to copy the definition down first. See if you can publish OK after this,

    There is a way to fix, if this is indeed the problem,

    Many Thanks,

    Tom

  • Stuart Burrows 61 posts 110 karma points
    Jan 24, 2011 @ 11:15
    Stuart Burrows
    0

    Hi Tom,

    Thanks for that - works great!

    You say that there is a way to fix this - is this something you can detail or possibly direct me to a resource that deals with the issue?

  • Tom Smith 98 posts 172 karma points
    Jan 24, 2011 @ 11:34
    Tom Smith
    1

    Hi Stuart,

    Awesome stuff,

    In order to fix this, you are going to need to download the blog4umbraco source and rebuild the core DLL with a couple of adjustments;

    (If you're not comfortable doing this, I could probably share my compiled DLL on here somehow!?)

    1, download the latest version of the source here; http://blog4umbraco.codeplex.com/SourceControl/list/changesets

    2, on opening the source, you will notice that there are two versions of the blog4umbraco core in there. The main version (in the Umlaut.Umb.Blog folder), and one version in the "branches" folder under "try-codegeko-features." Most of the recent fixes have been done by Benjamin Howarth over at Codegeko, and he has commited these into the "try codegeko features" branch.

    3: Open up the main version of the source in visual studio, and open up the try codegeko version in another visual studio window. Navigate to the event handlers folder in both versions where you will find the autoping.cs class. Open up the class in both versions

    4, copy and past the codegeko version of autoping.cs into the main version, overwriting the main version.

    5, build the main version from the build menu

    6. Copy and paste the rebuilt main version's DLL into your website's bin folder

    7. Restore the pingServices definition to the blog doctype that you deleted eariler,

    8. Try to publish - should all work OK!

    Many Thanks,

    Tom

     

  • Stuart Burrows 61 posts 110 karma points
    Jan 24, 2011 @ 11:50
    Stuart Burrows
    0

    Hi Tom,

    Thanks! I will give this a go and let you know how it turns out

  • Stuart Burrows 61 posts 110 karma points
    Jan 26, 2011 @ 11:21
    Stuart Burrows
    0

    hmm...thought I posted here yesterday...

    Essentially I was saying I have passed this over to a colleague to build ((following your instructions Tom) and he is unable to complete the build because of some build errors. Would it be possible for you to share your file after all?

    Sorry for the delay in getting back to you and thanks again!

  • Tom Smith 98 posts 172 karma points
    Jan 26, 2011 @ 15:25
    Tom Smith
    0

    Hi Stewart,

    My compiled DLL is here http://www.thecogworks.co.uk/media/28866/blogdll.zip

    I'll leave it up there for a couple of days.

    It's stable on Umbraco 4.5.2

    Please note, there is one other tweak in there, namely that all comments are marked as spam by default. This is a small hack that allows comment moderation. You will have to review comments and 'mark them as ham' before they appear on the site - this can be done via the blog dashboard, specifically on the comments tab.

    Let me know if this does the trick,

    Many Thanks,

    Tom

  • Rob Watkins 343 posts 593 karma points
    Jan 27, 2011 @ 16:56
    Rob Watkins
    0

    Tom, I am going to hunt you down and kiss you. Removing the pingServices has stopped me from going to an early grave in a sanitarium.

    I can't vote as I don't have enough karma. So it's the hunting down. Sorry.

  • Tom Smith 98 posts 172 karma points
    Jan 27, 2011 @ 17:19
    Tom Smith
    0

    Hehehe! Cheers Rob! Would high five such an excellent comment on humour grounds but I'm still grasping for karma myself! 

    You might even be able to keep using ping services if you follow the steps above (or use my DLL as posted above).

    Not sure about the build errors Stuart mentions; the code geko branch of the source won't build as some dependencies are missing but as you're only copying and pasting the code in the autoping.cs class, you should be fine. The main branch builds OK on last check!?

    I'd share my VS2010 project file but it's part of a larger solution unfortunately. Might look at extracting if there is no way around the build issues,

    Tom

  • Kristian Ravnevand 91 posts 210 karma points
    Feb 14, 2011 @ 10:56
    Kristian Ravnevand
    0

    This forum rocks :-) Thanks for good answears

  • James Patterson 53 posts 192 karma points
    Mar 23, 2011 @ 10:43
    James Patterson
    0

    Nice one guys. Thanks.

  • Stuart Burrows 61 posts 110 karma points
    Mar 23, 2011 @ 10:46
    Stuart Burrows
    0

    Sorry for the long delay in accepting this; only just confirmed that it works.

    Thanks for help and patience!

  • Ludvig 12 posts 33 karma points
    Apr 27, 2011 @ 17:22
    Ludvig
    0

    Very nice ! Thanks a lot!

  • Lou 59 posts 169 karma points
    Nov 01, 2012 @ 04:08
    Lou
    0

    Hi Tom & Stewart

    I am having the same problem, is it possible to get a copy of the compile DLL Tom put up in the link above, which has been removed?

    Thanks

    Lou

  • Tom Smith 98 posts 172 karma points
    Nov 01, 2012 @ 11:03
    Tom Smith
    0

    Hi Lou,

    Errrrrrr! I have a horrible feeling that this code could be lost to the sands of time,

    I would strongly reccomend switching to uBlogsy http://our.umbraco.org/projects/starter-kits/ublogsy for blogging functionality if you can?

    Many thanks,

    Tom

     

     

  • Stuart Burrows 61 posts 110 karma points
    Nov 01, 2012 @ 11:07
    Stuart Burrows
    0

    haha, awesome. I wasn't sure if recommending uBlogsy was kosher and having been digging for that .dll

    If it is an option for you then yeah, definately switch. I did awhile ago; don't think I even have a production version of Blog4Umbraco where I could find this for you.

    If I come across it I'll upload, but I think it's gone for good now.

  • 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