Copied to clipboard

Flag this post as spam?

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


  • TaoistTotty 246 posts 314 karma points
    Jan 20, 2011 @ 16:24
    TaoistTotty
    0

    New Blog post error and publish

    I am running 4.5.2 and have not had the issue below until this year.

    The Blog folder have been moved into the folder within the website structure.

    When you create a post this is not created in the date folders but in the root folder.

    When publised a copy is created in the dated folders, which is shown as published, but the orginal unpublished version is still shown and the post does not appear on published site.

    If a further post is published the unpublished copy in the root is changed to the new name, and the previously publised version is now viewable on the published pages and so on.

     

    When publishing an unspecified error is show.

     

    Any suggestions?

  • Tom Smith 98 posts 172 karma points
    Jan 20, 2011 @ 16:40
    Tom Smith
    1

    Hi,

    OK, it seems like there are a few separate issues there.

    With regard to the publish issue that you mention at the end of your post; is it throwing a yellow screen of death? If you turn <customErrors mode="Off" /> under system.web in the web config, do you get a more descriptive error? If so, is the error the "key not present in the dictionary" error? If so, then I've bumped into this one before ;)

    The current release version of blog4umbraco isn't stable on Umbraco 4.5.2. You might have some luck at tackling multiple issues at once by downloading the latest version of the blog4umbraco source from here: http://blog4umbraco.codeplex.com/SourceControl/list/changesets

    The latest commits have been by Ben Howarth over at codegeko and his changes address many of the 4.5.2 compatibly issues. They're not in the main branch of the source however, but can be found in the branches folder under try codegeko features,

    Might be worth backing up your current blog4umbraco DLL then swapping it out for a freshly built one from the above source.

    Let me know about that first error though,

    Tom

     

     

  • TaoistTotty 246 posts 314 karma points
    Feb 19, 2011 @ 22:03
    TaoistTotty
    0

    Tom, sorry for the delay, but found the post about the dictionary error and this solved everything.

    thanks for your help.

    TT

  • Bex 444 posts 555 karma points
    Feb 22, 2011 @ 10:30
    Bex
    0

    TaoistTotty,

     

    Any of a link to the post you mentioned? Having exactly the same problem!

     

    Bex

  • Tom Smith 98 posts 172 karma points
    Feb 22, 2011 @ 10:34
  • Bex 444 posts 555 karma points
    Feb 22, 2011 @ 10:40
    Bex
    0

    Hi Tom!

    Thanks for the speedy response!

    Will the details at the link provided also be applicable for 4.5.2 as the first line says he has 4.6.1!

    Bex

  • Tom Smith 98 posts 172 karma points
    Feb 22, 2011 @ 10:46
    Tom Smith
    0

    Hi Bex,

    Yep, I originally discovered the fix whilst working on a 4.5.2 site, Seems it also works on 4.6.1,

    Cheers,

    Tom

  • Bex 444 posts 555 karma points
    Feb 22, 2011 @ 11:10
    Bex
    0

    Hi Tom!

    Ok, I copied your dll (including the moderation bit, which is greate as I'd customised for that, but now rolled back), that stopped my error and the post is sort of publishing and is viewable on the site!

    but in the backend if I right click and add a post it appears on the root of the blog rather than goes into the date folders, if I publish it, it stays put, doesn't get copied to the date folders or anything. 

    Did I miss something?

     

    Bex

  • Tom Smith 98 posts 172 karma points
    Feb 22, 2011 @ 11:13
    Tom Smith
    0

    Hi Bex,

    Think I've bumped into that one before,

    Can you share a screenshot of your blogpost doctype?

    Many Thanks,

    Tom

  • Bex 444 posts 555 karma points
    Feb 22, 2011 @ 11:15
    Bex
    0

    Another speedy response! Thanks..

    Any particular tab you need to see on the doc type? Also any suggestions on how to get images up here. or do I need to upload it somewhere and link?

  • Tom Smith 98 posts 172 karma points
    Feb 22, 2011 @ 11:26
    Tom Smith
    0

    Hi Bex,

    There's a little insert image button on the post editor next to the HTML button I think?

    It would be the Generic Properties tab on the doctype,

    Cheers,

    Tom

  • Bex 444 posts 555 karma points
    Feb 22, 2011 @ 11:29
    Bex
    0

    ahh Ok I'm silly, never noticed that before! Here is the image, hope you can see it properly looks a bit small!

     

  • Bex 444 posts 555 karma points
    Feb 22, 2011 @ 11:52
    Bex
    0

    Ok, I have been checking around abit more and have noticed that "PostDate" is missing from the properties.

    I have tried adding it, and also followed this post to change the alias "postDate" to "PostDate" and neither made a difference, blog post is still adding to the root!

  • Tom Smith 98 posts 172 karma points
    Feb 22, 2011 @ 11:57
    Tom Smith
    0

    Oooo, wierd!? When this happened to me in the past, I had a look inside the source and the sort method was looking for PostDate,

    If you're using my DLL with an alias of PostDate, it should work?

    Note; it doesn't sort on save, only on publish. It is not sorting on either?

    Tom

  • Bex 444 posts 555 karma points
    Feb 22, 2011 @ 12:43
    Bex
    0

    Sorry for the delay.. seemed to be caching something somewhere.. 

    UPDATE:

    When I have got the property "PostDate" with a capital P and as a datepicker and your dll I get this error when I try and add a blog post.

    Exception information: 
        Exception type: SqlHelperException 
        Exception message: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery
       at umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters)
       at umbraco.cms.businesslogic.datatype.DefaultData.set_Value(Object value)
       at umbraco.cms.businesslogic.property.Property.set_Value(Object value)
       at Umlaut.Umb.Blog.BlogDateFolder.Document_New(Document sender, NewEventArgs e)
       at umbraco.cms.businesslogic.web.Document.NewEventHandler.Invoke(Document sender, NewEventArgs e)
       at umbraco.cms.businesslogic.web.Document.OnNew(NewEventArgs e)
       at umbraco.cms.businesslogic.web.Document.MakeNew(String Name, DocumentType dct, User u, Int32 ParentId)
       at umbraco.contentTasks.Save()
       at umbraco.presentation.create.dialogHandler_temp.Create(String NodeType, Int32 TypeId, Int32 NodeId, String Text)
       at umbraco.cms.presentation.create.controls.content.doCreation()
       at umbraco.cms.presentation.create.controls.content.sbmt_Click(Object sender, EventArgs e)
       at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
       at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    
    Implicit conversion from data type datetime to int is not allowed. Use the CONVERT function to run this query.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
       at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
       at umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteNonQuery(String commandText, SqlParameter[] parameters)
       at umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters)
    
    when the p is a small p, I get no error, but it posts to the root! Arggggh!
    Also when using the small "p" although I don't get an error when adding a blog post, creating a new blog causes the error abover too!
    I think it's proper broken!
    Is there a full install I can reinsatll somewhere?
  • Tom Smith 98 posts 172 karma points
    Feb 22, 2011 @ 13:14
    Tom Smith
    0

    Arg! The sort method is definately looking for PostDate (with the capital), so it is this that is throwing the error. It seems to be trying to convert from a DateTime to an int at somepoint without trying a parse.

    This is a deep error (and one that I've not seen before when using b4u) which suggests that we are probably running different versions of b4u and my DLL is therefore incompatible,

    It looks like you're going to need to fix the original problem manually,

    There are some instructions in the post that I linked to above that might help!?

    Where did you get your version of b4u from?

    T

  • Bex 444 posts 555 karma points
    Feb 22, 2011 @ 13:47
    Bex
    0

    Right ok, I have spoken to my colleague who originall installed this and he downloaded it from the uumbraco blog4Umbraco project page, but the dll we are using is the one that comes with the download called Blog4Umbraco_2.0.26zip not the one called Blog4Umbraco_2.0.2_for_4.5.zip.

    He updated the xslt so they worked with the new schema and it was posting to the date folders originaly, but causes an error which is stopped by doing what this post describes, but then it throws the "The given key was not present in the dictionary." error when trying to publish a post.

    So we were using different version of the blog, as the blog we were using didn't actually use postdate at all, so that's why your dll didn't fix it.

    So back to square 1.. do you have a suggestion of the best way to proceed?

     

  • Tom Smith 98 posts 172 karma points
    Feb 22, 2011 @ 14:21
    Tom Smith
    1

    Hi Bex,

    Ok well I have two ideas left,

    A. The first is (using your DLL) just to remove the ping services entry from the blog doc type (this is what commonly causes the dictionary error). If your blog doesn't ping anything and therefore you dont need ping services, then this could be the best solution for you.

    B. Alternatively, you will need to download the source code associated with the blog for umbraco DLL that you're using, and re-write the autoping.cs class. Below is an ammended version of the instructions I linked to above; some people have experienced build issues though so the first idea might be your best bet!?

    1, download the latest version of the blog for umbraco source (hereafer referred to as the main version) here; blog4umbraco.codeplex.com/.../changesets Also download the source that corresponds to your version of the dll as mentioned above. 

    2, on opening the main version, you will notice that there are two versions of the blog4umbraco core in there. The first 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 "try codegeko features" version of the source in visual studio, and open up the Your DLL 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 Your DLL version, overwriting your version.

    5, build your version from the build menu

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

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

    8. Try to publish - hopefully will all work OK!

    T

     

  • Bex 444 posts 555 karma points
    Feb 22, 2011 @ 14:33
    Bex
    0

    I really appreciate your helping me Tom!

    I have removed the ping services and it works.. Hopefully this is going to be ok for now.. but I can try the other way if not later!
    I saw that somewhere when looking but had other errors too.. It's so confusing that there is two versions out there with the same version numbers but different code bases! 

    Thanks so much!

     

  • 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