Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9172697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:24:43+00:00 2026-06-17T16:24:43+00:00

On a refactoring exercise we are working on, we have to change Page Templates

  • 0

On a refactoring exercise we are working on, we have to change Page Templates for select websites. Most page get localized and have their page templates updated by the code below but for a few we get the following error:

XML validation error. Reason: The element 'Metadata' in namespace 'uuid:940d95aa-fcce-481c-8de5-c61d06c74f46' has invalid child element 'description' in namespace 'uuid:940d95aa-fcce-481c-8de5-c61d06c74f46'. 

List of possible elements expected: 'TitleSEO, KeywordsSEO, DescriptionSEO, omniture' in namespace 'uuid:940d95aa-fcce-481c-8de5-c61d06c74f46'. 

There is no description field in our metadata schema and TitleSEO, KeywordsSEO, DescriptionSEO, omniture are all optional fields which are not being changed by the code .

try
{
   pData = client.Read(page.Attribute("ID").Value, null) as PageData;
    //Localize Page
    if (!(bool)pData.BluePrintInfo.IsLocalized)
    {
        client.Localize(pData.Id, new ReadOptions());
        if (dTemplateIDs.ContainsKey(pData.PageTemplate.IdRef.ToString()))
        {
            pData.IsPageTemplateInherited = false;
            pData.PageTemplate.IdRef = dTemplateIDs[pData.PageTemplate.IdRef];
            client.Update(pData, new ReadOptions());
        }
    }
}
catch (Exception ex)
{
    Console.WriteLine("Error Inner " + ex.Message);
} 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:24:44+00:00Added an answer on June 17, 2026 at 4:24 pm

    It sounds like at some point in the past there was a field in your page metadata schema called “description” (which I suspect was later changed to what is now “DescriptionSEO”). These few pages that cause the error have probably not been updated since the change, and so have the old metadata field in their XML, hence the validation problem when you come to change the Page Template.

    If it’s only a few pages, just open the pages, add some description or otherwise change something, save them and then try your code again.

    If it’s more than a few, you’ll probably need to detect and remove the existing data programmatically.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently refactoring some Javascript code we have and amongst other things I've changed
I'm refactoring some code in a project I'm working on and I ran into
Recently I have been refactoring some of my C# code and I found a
I have been looking into refactoring some old code into a new WCF service,
While refactoring some old code I have stripped out a number of public methods
While refactoring my code base I found a piece of code which I'd like
When refactoring classes and methods JDT doesn't change referenced resources, while it does when
I'm refactoring some code and would like to junit test some methods but they
I am refactoring some code where I grab the values inputted into textboxes and
I was refactoring some code and found there are two places that can be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.