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:
Right click on the blog and create a new node with the blog post document type.
Enter my content and click save (saves correctly)
Click publish and the right side of the screen shows the error
Click save again and the tree is reloaded
Navigate to a newly created folder structure which makes up todays date and the blog post is now saved there.
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,
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,
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!
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.
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,
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.
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:
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
Hi Tom,
Thanks for the reply, glad I am on the right track!
Here is the stack trace:
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
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?
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
Hi Tom,
Thanks! I will give this a go and let you know how it turns out
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!
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
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.
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
This forum rocks :-) Thanks for good answears
Nice one guys. Thanks.
Sorry for the long delay in accepting this; only just confirmed that it works.
Thanks for help and patience!
Very nice ! Thanks a lot!
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
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
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.
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.