Can't create new language version of page

Vote:
 

Version: EPiServer CMS 6.0.530.0

Globalization is enabled and I've now enabled a new language. For the already created pages I can't add the language (with startpage and all pages below), EPiServer just says the page isn't available for the current language. I can't create any new pages with the new language below the startpage. I can however create a page with the new language below the root (parallel to the startpage), and I can move pages ... what is wrong? How can i make globalized versions of the old pages?

Tanks in advance.

#48969
Feb 24, 2011 18:12
Vote:
 

Hi!

It sounds like you need to enable the language in the language settings for the start page. Even though the language is globally enabled you can also enable/disable languages for different parts of the page tree which sounds like the case here.

Regards
Linus Ekström

#48982
Feb 25, 2011 7:04
Vote:
 

Thanks for the reply. Unfortunately that option isn't available... none of the language options (see http://dl.dropbox.com/u/9091767/episerver.png) are available for the old pages, only for new pages. Any idea what I could do (besides recreating the site as new pages)?

Regards,
Magnus

#48989
Feb 25, 2011 13:30
Vote:
 

I have had the same problem. When I exported some pages from and cms 4 site to a cms 5 site.

I needed to recreate the pages in an other location.

I had only 2 levels so this code expanins the consept for 2 levels, but I think u should make it recursive

void CreateBtn_Click(object sender, EventArgs e)
        {
            PageData targetPage = EPiServer.DataFactory.Instance.GetPage(PageReference.Parse(CreateIn.Text));
            int? pageTypeID = PageTypeResolver.Instance.GetPageTypeID(typeof(CorePageSimplePageType));
           
            PageDataCollection pages = EPiServer.DataFactory.Instance.GetChildren(new PageReference(962), LanguageSelector.MasterLanguage());
            StringBuilder debug = new StringBuilder();
            foreach (var page in pages)
            {
                debug.Append("<li>");
                debug.Append(page.PageName);
                CorePageSimplePageType createPage = CreatePage(targetPage, pageTypeID, page,debug);
                createPage.IsTypeEdocument = true;
                PageReference createdRef = EPiServer.DataFactory.Instance.Save(createPage, EPiServer.DataAccess.SaveAction.Publish);
                PageDataCollection pages2 = EPiServer.DataFactory.Instance.GetChildren(page.PageLink, LanguageSelector.MasterLanguage());
                if (pages2.Count > 0)
                {
                    PageData myTarget = EPiServer.DataFactory.Instance.GetPage(createdRef);
                    debug.Append("<ul>");
                    foreach (var page2 in pages2)
                    {
                        debug.Append("<li>");
                        debug.Append(page2.PageName);
                        CorePageSimplePageType createPage2 = CreatePage(myTarget, pageTypeID, page2,debug);
                        PageReference createdRef2 = EPiServer.DataFactory.Instance.Save(createPage2, EPiServer.DataAccess.SaveAction.Publish);
               
                        debug.Append("</li>");

                    }
                    debug.Append("</ul>");
                }
                debug.Append("</li>");

            }
            DebugLit.Text = debug.ToString();
        }

    

#48990
Feb 25, 2011 14:23
Vote:
 

And yes, its dirty code :)

#48991
Feb 25, 2011 14:23
Vote:
 

Ok, so this code basically replicates the site structure (or at least two levels) as new nodes? Thanks for the code/suggestion, I might try doing that.

Maybe also an export/import could work?

Regards,
Magnus

#48997
Feb 25, 2011 17:14
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.