+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / There is already an object named 'ref_XYZ' in the database. Could not create constraint. See previous errors.

There is already an object named 'ref_XYZ' in the database. Could not create constraint. See previous errors.

4 posts, 1 answered
  1. Farhan
    Farhan avatar
    4 posts
    Registered:
    19 Jun 2014
    27 Jun 2014
    Link to this post

    Hi,

    I am facing an issue with the Content Modules update and this time the error is in the SQL Database configurations. After I updated the columns in the Content Module and clicked on Publish, this error started showing up and its stuck at that point since then.

    Attached is a screenshot of the error. I am aware that the issue is with the CURD operations in SQL from Sitefinity but I need to know the best practice / procedure to fix the issue.

    I would really appreciate it if someone can help me out on urgent basis.

    Thanks!

    Farhan

  2. Boyko Nistorov
    Boyko Nistorov avatar
    16 posts
    Registered:
    17 Oct 2016
    02 Jul 2014
    Link to this post
    Hello Farhar,

    There is a issue present in Sitefinity 7.0. It can be observed when you make changes that require additional database tables to be created such as adding new language, adding new dynamic type to the same module or new media field. 

    As a temporary fix we can propose to manually rename the duplicate key. 

    The name of the key is not important, Sitefinity doesn't rely on it. The important part is that the key should be present in order to improve the performance of the queries. 

    The issue is fixed in the next Sitefinity release (7.1). 

    Could you please confirm that renaming the key is working for you?

    Regards,
    Boyko Nistorov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
    Answered
  3. Farhan
    Farhan avatar
    4 posts
    Registered:
    19 Jun 2014
    07 Jul 2014
    Link to this post

    Hello Nistorov,

    First of all its Farhan not Farhar :).

    Yes I had done the same way actually to over come this SF bug. The version I am using is SF 6.2.

    For additional information:

    While updating the SiteFinity Content modules in the Admin Module builder, We have to do publish after a set of "CURD" operations. For example, When adding fields, add all fields and hit publish and if deleting- delete the fields and then hit publish but do not do all operations at one go as the SF will be stalled with the operations and the order. The problem with the renamed keys as mentioned. Hence the above error is faced.

    Kindly let me know if anything I share was incorrect.

    Again thanks for the support, appreciate it.

    Regards,

    Farhan

  4. Vassil Vassilev
     Vassil Vassilev avatar
    308 posts
    Registered:
    21 Jan 2015
    09 Jul 2014
    Link to this post
    Hello Farhan,

    Yes this is the easiest workaround to this issue and once Sitefinity 7.1 is released, I strongly advise you to perform an upgrade to avoid publishing after each modification using the module builder. 

    Regards,
    Vassil Vassilev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
4 posts, 1 answered