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 8908119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:05:50+00:00 2026-06-15T03:05:50+00:00

The problem is, every time I create a ContentItem i want to also create

  • 0

The problem is, every time I create a ContentItem i want to also create localized version of it. The localized version should be the same as the original one, with some localizations that I’ll make. So basicaly, whenever i create a ContentItem of the specified type i’ll make a copy of it and do the localization changes, mark the original ContentItem as the localized ContentItem’s LocalizationPart.MasterContentItem and then persist the Item.

Initially i tried to create a copy of the origianl Item when the IContentHandler.Created method is called. The problem is that the Controller hasn’t yet ‘TryUpdate’ the Item, so it lacks data. I doesn’t seem to have access to the controller, in order to try update the Item manually.

I also can’t wait for the Controller to TryUpdate() the ContentItem and then access the already updated Item via some of the other IContentHandler methods, since they are called before that.

Also, persisting the newly created ContentItem is the last possible thing that it is done in the WorkContext, so i can’t query the DB until after the request thread is very much dead.

So, any insights on how to copy a ContentItem that is being created and persist the copy as another item would be great.

  • 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-15T03:05:51+00:00Added an answer on June 15, 2026 at 3:05 am

    I was able to access the updated ContentItem by the IContentHandler.Published method. The inconvenience here is that the method won’t be called until the ContentItem is “Published”. In my scenario though, this isn’t really a problem, since I’ll display either none of them (original ContenItem and localized ContentItem) or both.

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

Sidebar

Related Questions

My problem is that every time I do some operation with an URL like
I want to create a textbox which contents are validated every time the text
I used PHP to create MongoDB database. My problem is that every time I
It's a weird problem but every time I add a new document to Lucene.net
This is my problem. Every time I load the page, I get an alert
I'm having a problem after adding button on my star rating. Every time when
I am having problem with RubyMine 4.0.1 on Windows 7. Every time i run
I'm using IE8 and webdriver. The problem I have is every time webdriver runs
Every time I create a controller, rails generate a controler_name.js and a controller_name.css file
I got a List that I add to every time I create a new

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.