When I do a "Sync with Sitecore" for the new items present in my TDS project I get the error ParentItemNotFoundException. Although the parent items are already present I tried removing the parent item from Sitecore and then syncing the parent item. Parent item gets synced but even then the child items are not getting synced.
You can get this error if you have enabled the delta deploy feature in TDS. The issue arises when you add an item to your TDS project whose parent or one of it's ancestors have an updated date that is before the configured delta deploy date (IncludeItemsChangedAfter property). The deployment will fail because it wants to deploy the item you have added but can't because one of it's ancestors are excluded from deployment due to it's updated date.
See this post for more information about the delta deploy feature http://www.seanholmesby.com/true-delta-deploys-with-tds-classic/
Related
I am having an AWS personalize solution with 3 successful solution versions trained with trainingMode = "FULL" using both AWS console and AWS SDK python. However when I tried to create a new solution version with trainingMode="UPDATE" as shown in the code below:
import boto3
personalize = boto3.client('personalize')
personalize.create_solution_version(solutionArn = solution_arn, trainingMode = "UPDATE")
I've got back the following exception:
Exception has occurred: InvalidInputException
An error occurred (InvalidInputException) when calling the CreateSolutionVersion operation: There should be updates to at least one dataset after last active solution version with training mode set to FULL.
Anyone experiencing this issue, is there anything I miss to be able to train with an UPDATE mode?
The purpose of trainingMode="UPDATE" is to process new items added to the items dataset (via PutItems or a bulk upload) as well as impression data for new interactions added to the interactions since the last FULL/UPDATE training. The new items and impressions are used to update the exploration feature for solutions created with the aws-user-personalization recipe. That is, to bring in new/cold items for exploration and to adjust probabilities for existing cold items in further exploration. Note that UPDATE only brings in new items and impression data and does not retrain the model.
Therefore, if there are no dataset updates since the last FULL/UPDATE, there is no value in creating a new solution version with UPDATE.
Finally, keep in mind that Personalize automatically updates solution versions created with the aws-user-personalization recipe every two hours at no cost. This essentially does an UPDATE for you.
With User-Personalization, Amazon Personalize automatically updates the latest model (solution version) every two hours behind the scenes to include new data without creating a new solution version. With each update, Amazon Personalize updates the solution version with the latest item information and adjusts the exploration according to implicit feedback from users. This allows Amazon Personalize to gauge item quality based on new interactions for already explored items and continually update item exploration.
If you create a solution version with UPDATE, you will be charged for the server hours to perform the update. Practically speaking, the only time you would need to manually create a solution version with UPDATE is when you do not want to wait for the next automatic update.
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.
In web.config publishing agent Job is running every 2 minutes. For one item I have added publishing restriction. I have added Publishing from date and time .But the item is getting deleted from web database till that time.
Is this the behavior of sitecore?
Also I tried creating a new version of item and added publishing restriction on that. And it was working as expected. i.e item is not deleted from web database and after specified time it is getting published. Is this solution proper?
Yes, this is how it is supposed to work.
If you specify Publishable From and the Publishable To dates, item will be allowed in web database only between those 2 dates. That means, if you try to publish this item outside that date range, you will in fact unpublish the item. Similarly, if you set only one of those dates or if you clear the Publishable check box.
You can specify date ranges for particular item versions as well. In that scenario, Sitecore will only allow in web database the most recent version with either empty publishing restrictions or with publishing restrictions matching actual time.
You can find more information in Sitecore Content Author's Reference and Cookbook, in the Setting up Publishing Restrictions chapter.
Screenshots and cookbook relate to Sitecore 7.2, but it works in the same way in Sitecore 8.
Can anyone explain to me what state the data should be in for a healthy sitecore instance in each database?
for example:
We currently have an issue with publishing in a 2 server setup.
Our staging server hosts the SQL instance and the authoring / staging instance of sitecore.
We then have a second server to host just the production website for our corp site.
When I look in the master database the PublishQueue table is full of entries and the same table in the web database is empty.
Is this correct?
No amount of hitting publish buttons is changing that at the moment.
How do I determine what the state of an item is in both staging and production environments without having to write an application on top of the sitecore API which I really don't have time for?
This is a normal behavior for the Publish Queue of the Web Database to be blank. The reason is because changes are made on the Master database which will add an entry in the Publish Queue.
After publishing, the item will not be removed from the Publish Queue table. It is the job of the CleanupPublishQueue to cleanup the publish queue table.
In general, tables WILL be different between the two databases as they are used for different purposes. Your master database is generally connected to by authors and the publishing logic, while the web database is generally used as a holding place for the latest published version of content that should be visible.
In terms of debugging publishing, from the Sitecore desktop, you can swap between 'master' and 'web' databases in the lower right corner and use the Content Editor to examine any individual item. This is useful for spot checking individual items have been published successfully.
If an item is missing from 'web', or the wrong version is in 'web', you should examine the following:
Publishing Restrictions on the item: Is there a restriction applied to the item or version that prevents it from publishing at this time?
Workflow state: Is the item/version in the final approved workflow state? You can use the workbox to do a quick check for items needing approval.
Connection strings: Is your staging system connection strings setup to connect to the correct 'web' used by the production delivery server?
The Database table [PublishQueue] is a table where all save and other mutations are stored. This table is used by a Incremental Publish. Sitecore get all the items from the PublishQueue table that were modified more recently than the last incremental publish date. The PublishQueue tabel is not used by a full publish
So it is okay that this Table contain a lot of records on the Master. The web database has the same database scheme. (not the same data, web contain only one version of a item, optimize for performance) The PublishQueue on the web is Empty this is normal.
To Know the state of an item compair the master version with the web version, there can be more than 1 webdatabase, The master database do not know the state/version of the web database
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