Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Culture View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
dion.tsai-adrenalinmedia.com - 10/25/2011 7:35:18 PM
   
Culture
Hi there,

Originally, my site is created under the culture, English - United States.

Then i started creates bunch of pages and documents in the site. When i start building form validation, i realize that the date validation format is in US format. so I went to the site setting and changed it to "English - Australia". Then the whole site became not available to the new culture. Then i copied the items to the new culture by following the steps when i selected document in CMS desktop.

After all copied manually, everything is working for design, page etc under Edit. However, when i go to "Preview" and "Live site". I am having the following error message.

This document is not available in current culture. Create new culture version of the document to make it available.

Click here to go back to the home page


There are more than 300 documents within the site. Is there a way i can get around with this instead of creating those 300 documents with the correct culture manually. I am sure by changing the culture of the site should have a better steps for this. Please let me know how to resolve the issue.

Thanks.




User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/26/2011 1:30:43 AM
   
RE:Culture
Hi,

How to change the date format is described in this FAQ.

Regarding your second issue, please follow these steps:
1) go to Site Manager -> Sites and edit your site
2) on General tab, there is a field called "Default content culture"
3) Click the "Change" button next to this field
4) Select desired culture, make sure that the check box in the dialog window is checked and hit OK
5) Now, all documents in your site are set to given culture.


Best regards,
Juraj Ondrus

User avatar
Certified Developer v7
Certified  Developer v7
dion.tsai-adrenalinmedia.com - 10/26/2011 2:04:19 AM
   
RE:Culture
Hi there,

That was exactly how I changed the culture setting of my site and therefore the error is showing to me. The default content culture is now already set to "English - Australia".

My site should have 2 cultures which is "English - United States" and "English - Australia" since i am copying contents from US culture to Australia one.

For some reasons the US one is gone. So I tried to add the US back to the site. Now i can see two flags in the CMS desk and the preview and live site is now working.

Then I tried to remove the US culture in the site setting and it gave me an error, The site contains some documents of culture 'en-US'. The culture cannot be unassigned.

All i want is only the AUS culture contents for the site and remove US ones. Is there a way i can force to delete the culture as I would like to delete all the contents along with the culture.

Thanks.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/26/2011 6:11:00 AM
   
RE:Culture
Hi,

If the document is not created in given culture, you will get the error on Preview/Live site. Is the document marked with a black cross? If so, this document is not created in given culture.

In order to remove some culture, you need to switch to the culture in CMS Desk and if you are sure you want to remove all documents, just delete the root document (but do not destroy all culture version). After all documents are deleted from given culture, you can remove the culture from site setting too.

Best regards,
Juraj Ondrus

User avatar
Certified Developer v7
Certified  Developer v7
dion.tsai-adrenalinmedia.com - 10/26/2011 7:17:14 PM
   
RE:Culture
Hi there,

I do not have the black cross on my documents when i saw the error.

When deleting the root document, it does not delete the children documents for that culture. Either delete all children with all cultures or destroy documents. I do not want to delete 3xx documents manually which is tedious.

I ended up with going to the DB and run the script below to delete all the US culture documents.


delete from CMS_document where documentculture = 'en-US'
delete from CMS_Attachment where AttachmentDocumentID in (select documentid from CMS_document where documentculture = 'en-US')
delete from CMS_DocumentTag where DocumentID in (select documentid from CMS_document where documentculture = 'en-US')
delete from Blog_Comment where CommentPostDocumentID in (select documentid from CMS_document where documentculture = 'en-US')
delete from Blog_PostSubscription where SubscriptionPostDocumentID in (select documentid from CMS_document where documentculture = 'en-US')
delete from CMS_DocumentCategory where DocumentID in (select documentid from CMS_document where documentculture = 'en-US')


Once removed, then i went to the site setting and i could remove the culture successfully. Not sure the steps that i went are correct or not. But it seems working fine at the moment.

Thanks.