Saturday, December 10, 2016

Links Removed from master Database when we delete reference item from other database in Sitecore 7

If Your Project is running on sitecore7 update 3 or below version, then you should read this blog to avoid the Link tagging deletion problem from master database:

Have you ever faced this issue?, you switched to a different database than the master database, deleted an item, and selected "Remove Links" in the breaking links dialog box, the links would be removed from the master database instead of the selected database.

Yes, I recently faced the same issue in one of my project which is running on Sitecore 7.0 rev. 130918.

I deleted some items from web database with selected "Remove Links" in the breaking links dialog box, and the links removed from master database instead of web database.

But as per the expected behavior it should delete from web database instead of master database as I selected the current database as web.

So this is the problem in this version and I lost my production data(tagging) from master database due to this behaviour, Thanks  to my DBA who quickly restored the production master database.

Below are the steps to reproduce this issue:

Create 2 items in master database and linked item1 in item2 as below

Publish to Web database

Check the link database in the core database:

Delete the item1 from the web database:

Now check the link database:

It deleted the links from the master database instead of web database as we deleted the link from web database.

Now check the master database:

The tagging has been removed from master database from item2. we tagged item1 in item Link Field.

But I tried to replicate this issue in other Sitecore version like 7.5, 8.0,8.1 and its working fine.

Then I connected to the sitecore support team and they provided the hotfix for this issue.

Again thanks to the sitecore support team for the quick reply,

Below are the steps for the hotfix.
1. Copy the attached “Sitecore.Support.362884.dll” assembly to the “\bin” folder.

2. Replace the following line in the <uiDeleteItems> configuration section of the “web.config” file:
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="CheckLinks" /> 
With this line:
<processor mode="on" type="Sitecore.Support.Shell.Framework.Pipelines.DeleteItems,Sitecore.Support.362884" method="CheckLinks" />

3. Replace the following line in the “\Website\sitecore\shell\Applications\Links\BreakingLinks\BreakingLinks.xml” file:
<CodeBeside Type="Sitecore.Shell.Applications.Dialogs.BreakingLinks.BreakingLinksForm,Sitecore.Client"/>
With this line:
<CodeBeside Type="Sitecore.Support.Shell.Applications.Dialogs.BreakingLinks.BreakingLinksForm,Sitecore.Support.362884"/>

Download the Sitecore.Support.362884.dll

This issue has been fixed in Sitecore CMS 7.0 rev. 140120 (Update-4).
For more information please use the reference number 362884 in the following release notes:

I Hope this article will help you.

Hapy sitecoring