|
Article relates to
|
3.2 SP1
|
|
Created by
|
Yasen Kiprov
|
PROBLEM:
There is an issue in the upgrade from Sitefinity 3.1 to 3.2
SP 1. If you use localization for the Blogs module and you have blog posts in
different languages, sometimes the Blog Posts
control does not show correct results. All posts are available in the
administration, but posts in languages different from the default one might be
hidden for the Blog Posts control.
DESCRIPTION:
During the upgrade, the database is changed in order to be
compatible with the new Generic Content database design. In version 3.1 meta
fields for modules based on Generic Content (News, Blogs, Generic Content) were
not localizable. Thus, when upgrading to version 3.2 Service Pack 1, the metadata
for blog posts is not saved correctly. The Blog
Posts control relies on this information and that is why incorrect results may
be displayed, and posts may be missing.
SOLUTION:
The following script should be executed in the upgraded
project database:
| update sf_GCMetaData |
| |
| set sf_GCMetaData.CntPrntID = |
| |
| (select sf_CmsContentBase.ParentID |
| |
| from sf_CmsContentBase |
| |
| where sf_CmsContentBase.ID = sf_GCMetaData.ContentID), |
| |
| sf_GCMetaData.Status = |
| |
| (select sf_CmsContentVersion.StatusLoc |
| |
| from sf_CmsContentVersion |
| |
| where sf_CmsContentVersion.ID = sf_GCMetaData.ContentID and sf_CmsContentVersion.LangID = sf_GCMetaData.LangID) |
| |
This should fix the incorrect meta fileds for the blog
posts, resulting in correct results for the public control Blog Posts.
ALTERNATIVE SOLUTION:
Another workaround could be to manually set the correct information
for every blog post. For smaller sites it is possible to iterate through each
blog post in the administration and just edit and save it. Saving the post will
also save meta fields correctly.