Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Creating blog posts error View modes: 
User avatar
Member
Member
sasdaman - 4/10/2009 6:42:13 AM
   
Creating blog posts error
Hi,

I've followed the documentation to create the blog document and complete all settings required. I then attempt to create my first blog post but when I complete the post title, summary and text and choose save I receive the following error:

An error occurred when saving data:Object reference not set to an instance of an object.

I also noticed going into the CMS Desk > MyDesk > My Blog > Under the comments tab I receive this error:
Server Error in '/' Application.
[DataConnection.ExecuteQuery]: Query: SELECT * FROM View_CMS_Tree_Joined_Versions INNER JOIN CONTENT_Blog ON View_CMS_Tree_Joined_Versions.DocumentForeignKeyValue = CONTENT_Blog.[blogID] WHERE ((SiteName = N'limeweb') AND (((NodeOwner = 53) OR ((';' + BlogModerators + ';') LIKE ';administrator;')) AND(NodeOwner = 53))) AND (ClassName = 'CMS.Blog') ORDER BY 1 : caused exception: Invalid column name 'BlogModerators'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: [DataConnection.ExecuteQuery]: Query: SELECT * FROM View_CMS_Tree_Joined_Versions INNER JOIN CONTENT_Blog ON View_CMS_Tree_Joined_Versions.DocumentForeignKeyValue = CONTENT_Blog.[blogID] WHERE ((SiteName = N'limeweb') AND (((NodeOwner = 53) OR ((';' + BlogModerators + ';') LIKE ';administrator;')) AND(NodeOwner = 53))) AND (ClassName = 'CMS.Blog') ORDER BY 1 : caused exception: Invalid column name 'BlogModerators'.

Source Error:

Line 353: }
Line 354: // Get comments accordint to where conditions
Line 355: gridComments.DataSource = BlogCommentInfoProvider.GetComments(currentUser.UserID, currentUser.UserName, where, blogWhere);
Line 356: gridComments.ReloadData();
Line 357: }


Source File: c:\Inetpub\_limeweb\CMSModules\Blogs\MyBlogs\MyBlogs_Comments_List.aspx.cs Line: 355


Anyone had a similar problem getting the blog module to work?

Kind regards,

Sahus Pilwal

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 4/16/2009 5:27:16 AM
   
RE:Creating blog posts error
Hi Sahus,

Could you please check the database table: CONTENT_Blog? The standard one from 4.0 version contains column: BlogModerators and it seems your one is missing it.

Best regards,
Helena Grulichova


User avatar
Member
Member
sasdaman - 4/16/2009 2:25:22 PM
   
RE:Creating blog posts error
Hi Helena,

I checked the SQL table for CONTENT_Blog and your right there is no column for BlogModerators. How should I go abouts fixing this problem? Create a new column? What is your suggestion?

Kind regards,

Sahus Pilwal

User avatar
Member
Member
sasdaman - 4/16/2009 2:35:24 PM
   
RE:Creating blog posts error
Hi Helena,

I also receive the following errors in the log files

Event code:	EXCEPTION
User ID: 53
User name: administrator
IP address: 213.208.115.250
Description: EXCEPTION MESSAGE: Exception of type 'System.Web.HttpUnhandledException' was thrown.; STACK TRACE: at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.cmsmodules_blogs_myblogs_myblogs_comments_list_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Site name: limeweb
Machine name: WIN-HJBZI0J1U2K
Event URL: http://www.lime-group.co.uk/CMSModules/Blogs/MyBlogs/MyBlogs_Comments_List.aspx


Kind regards,

Sahus Pilwal


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/17/2009 8:36:32 AM
   
RE:Creating blog posts error
Hi,

It seems that you have upgraded the CMS before. It is possible that the SQL script was not executed successfully and the DB is missing some columns. I will sent to your e-mail address export package with the blog document types, so you can import it to your CMS and the DB tables should be updated. I am sorry for this inconvenience.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
sasdaman - 4/17/2009 7:19:50 PM
   
RE:Creating blog posts error
Hi,

No I believe I started new from version 4.0. I have received your e-mail with the export packages. I will run these on our development server first to see if it is fixed then publish to production server.

I will let you know if this resolves the issue. Many thanks for your help so far!

Kind regards,

Sahus Pilwal

User avatar
Member
Member
sasdaman - 4/21/2009 10:46:36 AM
   
RE:Creating blog posts error
Hi,

Yes the export package worked. It updated the tables as required & now I'm able to create blog posts.

Many thanks for your help.

Kind regards,

Sahus Pilwal

User avatar
Member
Member
haidderali-yahoo - 6/20/2010 3:59:55 AM
   
RE:Creating blog posts error
Hi,
I am getting the same error as i try to add my first blog post:

[DataConnection.ExecuteQuery]: Query: SELECT BlogID, ClassName, BlogName, NodeID, DocumentCulture, NodeOwner, BlogModerators FROM View_CMS_Tree_Joined_Versions INNER JOIN CONTENT_Blog ON View_CMS_Tree_Joined_Versions.DocumentForeignKeyValue = CONTENT_Blog.[blogID] WHERE ((SiteName = N'dotnetgroup') AND ((NodeOwner = 53))) AND (ClassName = 'CMS.Blog') ORDER BY BlogName ASC : caused exception: Invalid column name 'BlogModerators'.

Can you send me the export packag on my email add. too. Moreover, can you please guide me how to access the DB tables in kentico CMS?

Regards

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/21/2010 6:45:21 AM
   
RE:Creating blog posts error
Hi,

Could you please tell us which version of Kentico CMS do you use?
You can access the DB using MS SQL Management studio interface.

Could you please check whether the table CONTENT_Blog contains column named BlogModerators?

What was the recent change in your CMS before this error?

Best regards,
Juraj Ondrus


User avatar
Member
Member
haidderali-yahoo - 6/22/2010 10:15:43 AM
   
RE:Creating blog posts error
I'm using version 5.0 of Kentico CMS. The CONTENT_BLOG table doesn't have a column named 'BlogModerators'.

This is the first thing that i tried to do with the CMS i.e. created a blog module and tried to insert a blog-post. Please guide me how to resolve the issue.

Thanx

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/23/2010 1:22:10 AM
   
RE:Creating blog posts error
Hi,

Was your CMS upgraded before? This field/column was added in 4.x versions.
To fix this issue you can simply go to Site Manager -> Development -> Document types -> edit Blog type and add field with attribute name BlogModerators.

Best regards,
Juraj Ondrus

User avatar
Member
Member
haidderali-yahoo - 6/23/2010 10:49:36 AM
   
RE:Creating blog posts error
I've successfully added the attribute. But now i am getting the following error when i try to save the blogpost:

An error occurred when saving data:Object reference not set to an instance of an object.

Please help me in this regard too.

Regards,
Haider Aslam

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/24/2010 1:58:39 AM
   
RE:Creating blog posts error
Hi,

Could you please send us whole error message? If the debug mode is not turned on, please do so and send us detailed error message so we can see more details. Thank you.

Best regards,
Juraj Ondrus

User avatar
Member
Member
codemonger-codemongers - 8/30/2010 8:22:29 PM
   
RE:Creating blog posts error
An error occurred when saving data:Object reference not set to an instance of an object.

after following the above steps.
I can now create a post, but I get the following
An error occurred when saving data:Object reference not set to an instance of an object.

ver. v5.0.3671
Site has been live for almost a year now. The client asked me to create a blog, now I've inherited a mess.

Please advise.

Thanks

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/31/2010 7:52:57 AM
   
RE:Creating blog posts error
Hi,

Was the CMS upgraded before?
Could you please describe us all the steps you have made so far so we can see at what stage you are?

Best regards,
Juraj Ondrus

User avatar
Member
Member
codemonger-codemongers - 8/31/2010 8:42:54 AM
   
RE:Creating blog posts error
I'm not sure if the system was upgraded or not. I've stepped into this role for the client.

So I followed the steps from http://www.kentico.com/Docs/DevGuide/index.html?adding_blog_to_your_site.htm and received the error that started this thread. I followed the steps you provided to add the blog moderators field. That solved it to this point.

Thanks
Rick

User avatar
Member
Member
brian-hedtec - 4/13/2011 12:57:10 PM
   
RE:Creating blog posts error
I receive the exact same error:

An error occurred when saving data:Object reference not set to an instance of an object.


at CMS.treeEngine.treeNode.setValue (string columnName, Object value)

at CMS.treeEngine.treeNode.MergeTrackBackUrls()
at
CMS.workFlowEngine.DocumentHelper.InsertDocument(TreeNode node, Int32 ParentNodeId, TreeProvider tree)

at

Cmsformcontrols.cmsform.saveDatatoDB()



I have added the blogModerators field but still get the error... any ideas?

Version: 4.0 Build: 4.0.3328

User avatar
Member
Member
codemonger-codemongers - 4/14/2011 7:53:21 AM
   
RE:Creating blog posts error
I was sent an import script to fix this. Once I applied it, the blog started to run smoothly.

I'll try and find it for you.

KENTICO is my new favorite CMS.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/18/2011 11:15:38 AM
   
RE:Creating blog posts error
Hi,

I would recommend upgrade to newer version - at least to 4.1. I think it might help. Also, the script mentioned above - if I found the correct e-mail, it was a document type object export package but anyway, it was for version 5.0 - you will need to upgrade to this version too. I am sorry for this inconvenience.

Best regards,
Juraj Ondrus

User avatar
Member
Member
codemonger-codemongers - 4/18/2011 4:07:18 PM
   
RE:Creating blog posts error
Thanks Juraj, I forgot to mention I was on 5.0.