I have a large amount of data(content created by user, not developer) created in Sitecore.
I know that in order to transfer large amount of data from one environment to another, I need to serialize all the content first.
My question is, after I serialize the content, do I need to create a designer package that contains the data I want to move? Or after I serialize, I use the serialized file?
Serialization is an option, but you could also create a package through the Package designer, download it and install it on the other environment.
If you are installing big packages, it is a good practice to set the value of Indexing.UpdateInterval in the web.config to 00:00:00 to prevent starting the Lucene indexer during the package install which results in much longer install times.
You don't need to create a package, use the serliazied file and update via the UI as below.
To update an item from the text file:
In the Content Editor, select the item that you want to update.
On the Developer tab, in the Serialize group, click Update Item.
To update an item with all its subitems from the file system:
In the Content Editor, select the parent item that you want to update with all its subitems.
On the Developer tab, in the Serialize group, click Update Tree.
To update the whole database:
In the Content Editor, select any item.
On the Developer tab, in the Serialize group, click Update Database
You can also use the "Transfer Item to Another Database" feature.
Just select the database where you want to go, go to Control Panel, Database, Transfer Item to Another Database.
This will open a wizard. Then you can select the Source items (the items you want to transfer to another database), then select the Target database and select where you want the items to be in the tree (i.e. under Home or some other node).
For some more information you can go to this blogpost by Sam J. Griffin, which explains it step by step.
One very important side-note though - don't copy the /sitecore/templates/sytem if you want to do all templates. This will result in some circular reference issues. If it's just content that you're copying it should be fine.
If you have a spare $149 then you should also take a look at the new Sitecore synchronization tool from Hedgehog:
http://www.hhogdev.com/Products/Razl.aspx
Related
I am working with Sitecore Intranet Portal. I am using web database for CD.
If a user change his email Id. How would I publish this to master database.
I am using this code to publish item from web to master db.
// The publishOptions determine the source and target database,
// the publish mode and language, and the publish date
var publishOptions =
new PublishOptions(Database.GetDatabase("web"), Database.GetDatabase("master"),
PublishMode.SingleItem,
item.Language,
DateTime.Now);
var publisher = new Publisher(publishOptions);
// Choose where to publish from
publisher.Options.RootItem = item;
// Publish children as well?
publisher.Options.Deep = true;
// Do the publish!
publisher.Publish();
It would be nice to know the correct procedure.
To publish from web to master is a bad practice.
This kind of content is named User Generated Content. I suggested to use this approach :
https://sitecore.unic.com/2015/07/16/user-generated-content-in-a-security-hardened-environment
Or you can use webservices. This allows all content (even user-generated) to be authored in your CM instance. This allows you to leverage the capabilities of the platform for workflow, publishing, etc.
Either use an external database or use Sitecore users for a certain domain and store everything in the core database. The core database is commonly shared between all environments
You can make use of package to transfer your item from web to master. You can follow the following steps:
Create your item package from web.
Use the tool that i have developed to convert the destination of the items. That is, change from web to master. The tool is found on marketplace at Sitecore package modifier.
Install the modified package on the master database.
Another solution is to have a schedule job that create the package from web, modified it and install it on the master database. This hence require no manual intervention.
I prefer to use this method than the sitecore transfer method because the transfer method tends to timeout or cause an error if there are lots of items to transfer.
The best practice to store the user information in the Core database. Sitecore is using ASP.NET membership to manage the user accounts. I recommend you to store all the user info in the core DB.
Sitecore doesn't provide any option to publish data from web to master, however, it has provides you an option to transfer data from web DB to master DB.
Check out my blog Transfer Items from Web to Master Database for complete details on transferring the data from one DB to another DB
Step 1: Login to Sitecore desktop mode.
Step 2: Select the source database from where you need to transfer the items. If you want to transfer from Web to Master then select Web Database in the right-hand bottom corner.
Step 3: Open the content editor and select the item which you would like to transfer.
Step 4: Right click on the Item and select Copying>>Transfer and click on the transfer button
Step 5: In the Transfer window verify if the source item is selected properly or not.
Step 6: Click on Next to continue. In this window first thing is to select the destination database to which you need to transfer. The second thing is to select the parent item or the destination folder where you need to place this item. In my case, I need to select Layout because sublayouts are present in the layouts item.
Step 7: Click on next, here you will get an option which says include subitems. Select the checkbox if you need to restore the subitems also else uncheck the box to transfer only the selected item.
Step 8: Click on transfer button and it will start the transfer process. Close the dialog box once the transfer is completed.
I'm working with SharePoint 2007 and a group has asked me to help with managing their sites. They set up multiple sites (one for each team = 50 or so teams >_<) and each team has their own copy of the same list created from the same template.
Recently they decided that collecting the data from 50 different sites is too much and want to combine all the lists into one at the top level but they don't want all that data left behind on the old lists (1 per site) they want it all moved into the new list that will also use the same template to be created.
I tried exporting one of the sub-site's lists to Excel (2010) and copying it over into the new master list's empty exported to excel list and then using the "Export Table to SharePoint List..." option. Each time I try, I get an error "An unexpected error has occurred. Changes to your data cannot be saved."
I thought this might have to do with the Path field that shows up in the Excel spreadsheet versions of the list data so I modified it to what the new master list should have but no luck.
Any ideas?
Thanks for your help :)
I don't know what rights you need to do this, but go to each site and do the following instructions:
Click on Site Actions
Click Site Settings
Click Manage All Site Settings
Under the Site Administration Group, click Content and Structure
A window comes up that looks like Window's File Manager. You are in the current site, but you can see that you can browser to other sites in your site collection from the left panel.
Locate the list you want to copy items from and click the name. You will see all the items, or at least in pages of 100.
Change the paging quantity from 100 to 1000 in the top right, where it says "Show 100".
Select all the items you want to copy. There's an icon that looks like a stack of papers, to select all items on this page.
Click Actions in the toolbar, then click "Copy...". A dialog will come up of the current site collection.
Choose the destination then, click Ok.
Repeat this until you're done copying all items from the list.
Be patient while the copy process completes, then switch to the other 49 sites.
You cannot copy from one site collection to another. You can copy between subsites or sister sites.
If you can't see the Content and Structure link in the Site Settings page, use the 12 hive URL:
http://sitecollection/_layouts/sitemanager.aspx
You'll have the items copied in no time without the help of IT/development.
I'm searching for a django package that would allow me to save history of my models, but only on updates. I found django-reversion, but after a quick look it doesn't seem to have such ability. Database triggers are also not an option, since my database structure is rather complicated, and writing them would be hard.
I had the same problem at some point.
My solution at that time was to define two models:
content: which corresponds to an abstraction of content of the website. This model is what holds the current content of the website.
action: which corresponds to an abstraction of content change on the website.
content has two pointers (OneToOneField) to actions: first edit, which is the action that created that particular content and last edit, the action that has the last modification made on the content.
action has one pointer (OneToOneField) to an actor, the user that made the action, and a pointer (ForeignField) to another action, the previous action on the particular content. It also has a TextField which saves content change. This can be for instance a diff-like text for databases, or simply a pickled dictionary.
In some sense this is equivalent to version control like git, where "action" is a commit on a specific content (and not on the whole project), and content is the source. Commits are linked via "previous commit", and save content change and user.
You can use south. It detects changes to your models and creates migration files that allow you to sync your database forward and backward.
How do bind a DropLink using a custom dataprovider?
More info:
I am trying to build a product catalogue site using Sitecore. Each product in the sitecore content tree can have a star rating and short text review attached to it (which will be linked to a user extended with a profile provider but that is another question).
I am planning to store the review information in an external database and reference it using a custom dataprovider. I have downloaded the NorthwindDataProvider from the Shared Source (here) and have altered it to use a table which contains the rating, text and a uniqueidentifier field to store the ID of the product from in sitecore the review is attached to.
The template field is a droplink and the datasource is set to the products in the catalogue.
When I edit a review in the custom dataprovider using the sitecore content editor, the droplink states 'Value not in selection list' even if I select one of the populated products and save using sitecore.
It is saving the ID in the database but if I look at the raw value it displays the id without the curly brackets. Working droplink fields' raw values appear to contain the brackets.
To create a review, I am using a jquery post to a webservice which writes to the database using an external datacontext. Should I be using some Sitecore API to use the custom dataprovider instead?
Any information using custom dataproviders would be helpful. The documentation I've been able to find has all stated what can be done but I'm struggling to find actual implementation.
So the first thing is that you have a template field and you're using droplink which is going to store the guid for the item selected. I'm not quite clear on whether or not you're pointing the datasource to a Sitecore item or not.. but that's essential if you're using droplink. Here's what I would suggest instead for the most straight forward way to do this:
Create a template that you add fields to handle the logic dealing with your catalog items. How you do that is your choice and Sitecore doesn't care since its only going to deal with the item and all it cares about is finding an item... you write business logic to manipulate the external data.
Once you have a folder that stores your catalog items, you could easily write a script to be triggered by the Rules engine in Sitecore or a Sitecore task that runs regularly to get your catalog items to add/update or remove the corresponding list of Sitecore items.
Also, another option that is more complex to implement, but if you have multiple data sources on your site, is a valid approach, is to use an object framework (like the Entity framework) as a data object layer that allows you to create and populate common objects with from any data source.
Hope this is helpful!
This is my scenario: I need to copy files to a sharepoint document library using its web services and set metadata on them. That's all possible with CopyIntoItems (from Copy webservice) except for Lookup fields. CopyIntoItems ignores them, so i need another way to set data on those fields.
I've tried to create a list item with the mandatory and lookup fields metadata and then, using the item ID (creating a FieldInformation field with the ID, as well as some other simple metadata), called the CopyIntoItems method and, instead of updating the item, sharepoint created a new one.
I can't do this in the reverse order because i have no way to get the ID from the item created by CopyIntoItems...
So, the question is: How can i upload a file to a sharepoint document library and set all its metadata? Including Lookup fields.
Use a regular PUT WebRequest to to upload the document into the library
Query the document library to find the ID of the item you just uploaded (based on path)
Use the Lists.asmx web service to update the document metadata
Helpful link: Uploading files to the SharePoint Document Library and updating any metadata columns
Keep in mind that if the destination folder item count + the ancestor folders item count exceeds the list view threshold then you can't query the list for the id (step 2 from Kit's answer).
Queries can be done more efficiently if constrained to a particular branch in the folder hierarchy. A workaround would be to modify the site settings, but the queries would be sluggish and would make the solution less portable because the threshold for Office365 and BPOS can't be changed.
This explains it much better: http://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/create-or-delete-a-folder-in-a-list-or-library-HA102771961.aspx