Attachment Multiple field error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bertomi
    Junior Member
    • Aug 2019
    • 20

    Attachment Multiple field error

    I couldn't find information about the error below anywhere.

    If I create an Attachment Multiple field, the name of the field is attachments, which I place in the Layouts Search filters, I get the following message when using the field filter

    Error 500
    No 'foreignMidKey' parameter defined in the relation 'links'.

    Espo version 7.3, and 7.4​
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1622

    #2
    Please post your error log and inform in which entity this happens

    Comment

    • Bertomi
      Junior Member
      • Aug 2019
      • 20

      #3
      Custom entity, the entity name is Szerzodes. The name of the field is 'csatolasok', its type is Attachment Multiple.

      Error log entry:​
      [2023-05-18 06:20:27] ERROR: (0) No 'foreignMidKey' parameter defined in the relation 'csatolasok'.; GET /Szerzodes; line: 257, file: /volume1/web/espocrm/application/Espo/ORM/Defs/RelationDefs.php

      Comment


      • shalmaxb
        shalmaxb commented
        Editing a comment
        what is the related entity
    • esforim
      Active Community Member
      • Jan 2020
      • 2206

      #4
      I might be wrong here but it seem like your "Middle Table" is corrupted or the column that store these relationship is gone/delete/missing/blank.

      How relationship work (as far as I know afaik);

      For example:

      Contact -- ContactAccount -- Account

      John Smith -- accountid123 | contactid100 - Account

      This two accountid and contactid number is missing so all link between these two is lost.

      One way that may be able to restore it, is to re-create the same relationship with the same name and it might create the necessary file for the linking.
      Another way is I hope you already done is clear cache and rebuild.
      The 3rd way that may help is --hard rebuild using CLI, I tried this one but it fail. Due to Database permission or restriction or something.

      Sadly I don't remember any thread similar to your issue. It trial and error at this point.

      Few check I would recommend you to use is to check with other field to see if you got same error.
      Create new multi attachment field and see also if it just one field or all field.

      I did remember seeing a thread lately about someone upload/importing multiple Attachments. Maybe you did something similar but did it wrong and now missing data or corrupt it.

      Comment

      • Bertomi
        Junior Member
        • Aug 2019
        • 20

        #5
        No related entities. When I create an

        Field name: Attachment,
        Field type: Attachment Multiple

        Created in any custom entity, I get this message:field in any entity, I get this message:

        Error 500
        No 'foreignMidKey' parameter defined in the relation 'attachment'.​

        Comment

        • Bertomi
          Junior Member
          • Aug 2019
          • 20

          #6
          I am attaching a picture of the created field and the error message.​

          Comment

          • Bertomi
            Junior Member
            • Aug 2019
            • 20

            #7
            The error occurred after updating espocrm. Before, there was no problem with filtering to the field.

            Comment

            • Bertomi
              Junior Member
              • Aug 2019
              • 20

              #8
              Has anyone experienced a similar problem with the Attachment multiple field?

              Comment

              • Maarten
                Member
                • Jun 2020
                • 69

                #9
                No, but I have the same error for some other links

                Comment

                • yuri
                  Member
                  • Mar 2014
                  • 8631

                  #10
                  EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.
                  If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                  Comment

                  Working...