Performance Issues Suddenly

Topics: Troubleshooting
Sep 22, 2013 at 12:51 AM
I'm running version 1.5.1. I currently don't have the time to back-up and test 1.7.1 for the site. Just yesterday, the recent blog posts and blog menu option aren't appearing. I can browse to a post or via a tag.

Any ideas what could be causing this? I've been out of the Orchard loop for awhile and can't afford to have my site down.
Sep 22, 2013 at 1:56 AM
Anything in app_data\logs?
Sep 22, 2013 at 2:28 AM
The following seems to be most common:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Orchard.Blogs.Handlers.BlogPostPartHandler.GetItemMetadata(GetContentItemMetadataContext context)
   at Orchard.ContentManagement.Handlers.ContentHandler.Orchard.ContentManagement.Handlers.IContentHandler.GetContentItemMetadata(GetContentItemMetadataContext context) in c:\Build\Orchard\src\Orchard\ContentManagement\Handlers\ContentHandler.cs:line 333
   at Orchard.ContentManagement.DefaultContentManager.<>c__DisplayClass60.<GetItemMetadata>b__5f(IContentHandler handler) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 505
   at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in c:\Build\Orchard\src\Orchard\InvokeExtensions.cs:line 17
Like I said, what's very odd is that nothing has changed on the server or on the site.
Sep 22, 2013 at 3:17 AM
You probably have a corrupted post in there. Attach a debugger, find its id, and fix it in the database. Or restore a backup.
Sep 22, 2013 at 3:20 AM

How can I get a corrupted post if I haven’t updated anything lately?

Sep 22, 2013 at 3:30 AM

After closer look, it appears that the blog itself has been removed as it isn't showing up. However, the posts are still there. How can I get this restored and restore the relationship between the posts and the blog?

Sep 22, 2013 at 7:56 AM
Data corruption happens. I'm afraid you'll have to perform some wizardry directly in the DB after creating a new blog. It would be simpler if you could restore a backup.
Sep 23, 2013 at 3:31 PM

The problem is that I don't have a very current data backup. What tables are updated if I create a new blog? I want to be sure that my blog ID has the proper entry everywhere.
Sep 23, 2013 at 6:19 PM
As many tables as you have parts on the blog type, plus a couple for the content item itself. That's why restoring a backup is better. On the other hand, the actual relation between the posts and the blog is in the common part, so if you update that to point to the new blog, you should be good. Backup first, of course.
Sep 23, 2013 at 8:46 PM
Thanks. That helped. Now I have a different issue that I'll submit a new request about.