Announcement

Collapse
No announcement yet.

Name conflict: link or field with the same name already exists.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Name conflict: link or field with the same name already exists.

    I'm getting this error, after creating and deleting an entity link, any ideas how to solve it?

    I looked everywhere in my DataBase and File Manager, to find where to delete this link, but I haven't found.

    At logs I'm getting the following error


    [2021-11-30 00:55:38] ERROR: (409) Relationship with the same name 'processoContact' exists.; POST /EntityManager/action/createLink; line: 833, file: /home/chavese1/public_html/area/application/Espo/Tools/EntityManager/EntityManager.php [] []
    Last edited by guschaves; 11-30-2021, 06:18 PM. Reason: Problem solved

  • #2
    If it a relationship you can try going into

    Admin > Entity Manager > Relationship

    and try to delete/remove processoContact

    Comment


    • #3
      Originally posted by espcrm View Post
      If it a relationship you can try going into

      Admin > Entity Manager > Relationship

      and try to delete/remove processoContact
      So, that's the problem it didn't appear at Entity Manager, and I can't find it anywhere

      Comment


      • #4
        Hello,
        look in entity defs files

        in processo.json and contact.json and remove the link in theses files

        clear cache and rebuild after for see if error

        Comment


        • #5
          Sometimes it stays in one of the json files in the custom folders.

          Comment


          • #6
            Originally posted by shalmaxb View Post
            Sometimes it stays in one of the json files in the custom folders.
            It worked for Contacts and Accounts, but not for Processos relationship with Processos. There's a processoParent anywhere and I couldn't find it. Any ideas at where else should it be?

            Comment


            • #7
              You can search in the webfolders (as said already, probably anywhere in a .json file) and in the database. espoCRM does not look in other places, so it must be somewhere.

              As I work with different installations, it happened to me already, that I had copied a database from one installation to another, but referenced the database still to the old place. Whenever I made a change, id did not work, until I perceived, that I was working on a database, that was not referenced at all.
              What I mean, think thoroughly, if some weird configuration took place during your development.

              And as obvious as it seems to be: clear cache (espoCRM), Browser, rebuild (preferably by CLI), refresh page after that.

              Comment


              • #8
                First question: did you rebuild after deleting the link ? - I know is kind of very elemental, but sometimes it happens to the best of us

                If that is not the problem, and you made field or relationship changes using the Administration > Entity Manager panel, all these customizations would be contained in the folders

                custom/Espo/Custom/resources/metadata/entityDefs/{{your entity name}}.json

                So for example, if you created a relationship between Contact and Processo, the scripts affected would be:

                custom/Espo/Custom/Resources/metadata/entityDefs/Contact.json

                custom/Espo/Custom/Resources/metadata/entityDefs/Processo.json

                Reading the error thrown, it looks like you created a parent to children relationship between Contact (parent) and Processo (child) so the double definition is in one of these two custom scripts somewhere. Look for links type "hasChildren", "linkParent" or "belongsToParent"
                Last edited by telecastg; 11-30-2021, 05:03 PM.

                Comment


                • #9
                  Originally posted by shalmaxb View Post
                  You can search in the webfolders (as said already, probably anywhere in a .json file) and in the database. espoCRM does not look in other places, so it must be somewhere.

                  As I work with different installations, it happened to me already, that I had copied a database from one installation to another, but referenced the database still to the old place. Whenever I made a change, id did not work, until I perceived, that I was working on a database, that was not referenced at all.
                  What I mean, think thoroughly, if some weird configuration took place during your development.

                  And as obvious as it seems to be: clear cache (espoCRM), Browser, rebuild (preferably by CLI), refresh page after that.
                  So, it was an archive, that was still stored after rebuild, now it worked.

                  Comment


                  • #10
                    Originally posted by telecastg View Post
                    First question: did you rebuild after deleting the link ? - I know is kind of very elemental, but sometimes it happens to the best of us

                    If that is not the problem, and you made field or relationship changes using the Administration > Entity Manager panel, all these customizations would be contained in the folders

                    custom/Espo/Custom/resources/metadata/entityDefs/{{your entity name}}.json

                    So for example, if you created a relationship between Contact and Processo, the scripts affected would be:

                    custom/Espo/Custom/Resources/metadata/entityDefs/Contact.json

                    custom/Espo/Custom/Resources/metadata/entityDefs/Processo.json

                    Reading the error thrown, it looks like you created a parent to children relationship between Contact (parent) and Processo (child) so the double definition is in one of these two custom scripts somewhere. Look for links type "hasChildren", "linkParent" or "belongsToParent"

                    So, my problem is still trying to upgrade it from the Administration Panel, it's easier but often breaks something, next time all upgrade by CLI.

                    Comment

                    Working...
                    X