Deleted branch causing issues

I've deleted a branch that we will no longer use, and now all items created based on that branch show
[branch no longer exists]-{00000000-0000-0000-0000-000000000000}
in the 'created from' field.

That wouldn't be so much of an issue, but whenever we save an item (or sub-item) created from the branch, there is a popup saying:
The item "Item Name" contains broken links in these fields: The template or branch for this item is missing. Do you want to save anyway?

Does anyone know if there's an easy way to fix this up and get rid of the message? I've tried rebuilding the link databases but that hasn't helped.  I'd rather not have to run a SQL query statement across the items, but if it comes to that I will.

Thanks

  • Hi,

    MasterId field in SQL database is responsible for 'created from'.

    Review dbo.Items table and you will see it. If your Items were created from branch their fields MasterId have values - branch id (in your case id of branch that was removed). If items were created from template, 'MasterId' field has '00000000-0000-0000-0000-000000000000' value.
    How can you fix it? Here is an answer. Update MasterId field to 00000000-0000-0000-0000-000000000000.

    You can use next query. Be careful, use your own query to find broken items by filter. Here is what I used.

    update [your_db_name_master].[dbo].[Items] set MasterID = '00000000-0000-0000-0000-000000000000' where TemplateID = '5F116F39-6BB4-4AA8-888E-1436C133F758'

    P.S. Clean cache after update.
    /sitecore/admin/cache.aspx

  • Or this one.

    update [your_db_name_master].[dbo].[Items] set MasterID = '00000000-0000-0000-0000-000000000000' where MasterID = '[id of broken branch]'