Announcement

Collapse
No announcement yet.

Attachment Multiple field error

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

  • 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​

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

    Comment


    • #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

    • #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


      • #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


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

          Comment


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

            Comment


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

              Comment


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

                Comment


                • #10
                  EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.

                  Comment

                  Working...
                  X