Announcement

Collapse
No announcement yet.

ERROR 500, do not understand, why

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

  • ERROR 500, do not understand, why

    I have an entity connected to documents by two relationships:

    1. In bottom Panel n:n to show all connected documents
    2. In the entity itself one-to-one to get a certain value

    When I create a new document, I recently get an Error 500 at saving, although the record will be saved.
    This is the error message:'

    Code:
    ERROR: Slim Application Error Type: TypeError Code: 0 Message: Argument 1 passed to Espo\ORM\Repository\RDBRelation::relateById() must be of the type string, null given, called in /var/www/vhosts/kunstservice.net/test.kunstservice.net/application/Espo/Core/Repositories/Database.php on line 596 File: /var/www/vhosts/kunstservice.net/test.kunstservice.net/application/Espo/ORM/Repository/RDBRelation.php Line: 366 Trace: #0

  • #2
    Hi,
    I've tried to reproduce on EspoCRM 6.1.2 and haven't face any issue.
    What is your EspoCRM version?
    Could you describe the steps of how you created the relations and how you created a new document right before the issue?
    BTW please try to reproduce the error on the demo instance here https://demo.espocrm.com/.

    Comment


    • #3
      I use espoCRM 6.1.2
      I have one custom entity with a document`s bottom panel (relationship n:n), so the documents for the record in the custom entity are shown.
      Up to this point everything went normal and as expected.

      In the custom entity I needed another relationship to show the document ID (see this post: https://forum.espocrm.com/forum/gene...n-other-entity) in a field, what I realized with a 1:1 relationship and reading the ID by formula:

      Code:
      druckdateiID=entity\attribute('document.fileId');
      druckdateiID is the field in the custom entity. As far as I remember at this ppoint everything went ok still.

      After I created another new field in Email Templates to attach files from the document`s folder, I am not able anymore to use the field selector to create the placeholders (see screenshot).
      I think it was then when the 500 ERROR began.

      I saw, that in the moment, when I created this new field a json file was created in the custom entityDefs for emailtemplate. Even when I delete this file and let espoCRM use the normal emailtemplate file in app folder, the issue stays.

      Comment


      • #4
        Could you zip and provide your /custom directory. I will try to reproduce the issue on my side.
        Note, the /custom directory doesn't contain any sensitive or personal data. It just stores your customization (e.g. new entities, fields, relationships properties, etc.).

        Comment


        • shalmaxb
          shalmaxb commented
          Editing a comment
          sent by PM

      • #5
        Worked one more day on this problem. In the end I deleted one relationship between my custom entity and contacts. I then created it again and it started to work. So, I guess, that there was something destroyed during my work.

        Comment

        Working...
        X