Announcement

Collapse
No announcement yet.

Error 400 v7.2

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

  • rabii
    replied
    Originally posted by yuri View Post
    If it's manual customization, please consider debugging. I'm extremely busy with work these days. From early morning to late night daily
    Hey yuri

    Hey we are experiencing the same error, basically we are using an extension from Elba which allow to create pivot tables. we have 3 entities (Contract - Service and ContractService) the way it is set up is to allow to select services from the contract using the pivot table ContractService and there is a relationship between contract and contractservice as One to Many (one contract to many contractservices) we are using the field contractservices on the contract layout to allow to select a service and add additional data into using the pivot table. This field used to work fine but now it is producing error as you can see on attached screenshot. i have debugged and this is the message from the log WARNING: E_WARNING: Undefined array key "service" please note that the service is another relationship field between service and contractservice entities one service to many contractservice it seems that this is what causing the issue.

    this is the metadata of the field contractServices:
    Code:
    "contractServices": {
        "layoutListDisabled": true,
        "layoutDetailDisabled": false,
        "type": "linkMultiple",
        "layoutMassUpdateDisabled": false,
        "noLoad": false,
        "importDisabled": false,
        "isCustom": true,
        "rowActionItems": [
            "remove"
        ],
        "orderBy": "createdAt",
        "required": false,
        "enableForm": true,
        "layout": "listSmall",
        "middleLink": "service",
        "copyFields": [
            "assignedUser",
            "createdBy",
            "createdAt",
            "modifiedAt",
            "modifiedBy",
            "name"
        ],
        "footerSumFields": [],
        "enableSelect": true,
        "fields": [],
        "buttonsPosition": "bottom",
        "order": "asc"
    },​
    Any hint on how to solve this.

    Many thanks
    Attached Files

    Leave a comment:


  • jeamado
    commented on 's reply
    shalmaxb "When I unmark the mandatory checkbox in the entity manager for that field, the eror does not happen anymore".

    I have anyhow the same error uncheck the "mandatory" field or not when it have to be filled automatically by a Workflow.

  • rabii
    commented on 's reply
    i have the same issue exactly what you described. a field of relationship is failing when creating new record although the validation is disabled.

  • shalmaxb
    replied
    I have this error as well in various custom entities, not always for the same reason. One reason ocurrs, when I try to save a new record for the entity. In that entity the "name" field is mandatory. The error indicates, that the validation failed, although the field is filled.
    When I unmark the mandatory checkbox in the entity manager for that field, the eror does not happen anymore.

    The error also does not happen, if I modify an existing record, even if the modification is in the mandatory field.

    In another occasion the error occurred from a enum field, where I pull values from another entity (as well an enum field).

    Leave a comment:


  • jeamado
    replied
    I have this error in V7.2.4 for fields that are filled by Workflows. It seems that the instruccions in he Worekflows do not work, or are not recognized by some field validator, or something else. Had to restore last night V7.1.11 backup in order to continue working normally.

    Click image for larger version

Name:	image.png
Views:	771
Size:	144.4 KB
ID:	83656
    Last edited by jeamado; 10-01-2022, 07:39 PM.

    Leave a comment:


  • telecastg
    commented on 's reply
    Following alexisc example, I would suggest trying using " " instead of "" as option value and as default value.

  • yuri
    commented on 's reply
    Rule is simple. For enum you can store only values listed in field options. The same for link-multiple enum columns. I'm not sure it needs documenting as it was rather a fault of the previous versions of not having such validations.

    Field Validators are not new (they are pretty bad designed actually, I'd call them a legacy code), they were there but less validations were implemented.
    Last edited by yuri; 09-14-2022, 06:47 PM.

  • telecastg
    replied
    The errors are thrown by a new set of "FieldValidators" classes that execute specific validation rules by field type. https://github.com/espocrm/espocrm/t...ieldValidators

    One of Espo's greatest features, is that it can be easily customized to provide a unique solution for each user.

    It would be great if these rules could be documented (explained in the documentation) so everyone gets more familiar with this new functionality and can adjust existing or new customized fields..
    Last edited by telecastg; 09-14-2022, 06:40 PM.

    Leave a comment:


  • alexisc
    commented on 's reply
    had the same error, field "default" cannot be empty, fixed it and everything worked

  • yuri
    replied
    Could you also provide "flags" field metadata?

    Leave a comment:


  • bradaks
    replied
    Yuri,

    It isn't custom edited except for colors. THat doesnt seem to be what is affecting the server. Here is the metadata of the enum field.

    Code:
            "kitsRequested": {
                "type": "enum",
                "options": [
                    "",
                    "1",
                    "2",
                    "3",
                    "4",
                    "5",
                    "6",
                    "7",
                    "8",
                    "9",
                    "10",
                    "10+"
                ],
                "optionColors": {
                    "1": "FFFFFF",
                    "2": "FFFFFF",
                    "3": "FFFFFF",
                    "4": "FFFFFF",
                    "5": "FFFFFF",
                    "6": "FFFFFF",
                    "7": "FFFFFF",
                    "8": "FFFFFF",
                    "9": "FFFFFF",
                    "10": "FFFFFF",
                    "": "FFFFFF",
                    "10+": "FFFFFF"
                },
                "default": "",
                "isCustom": true,
                "audited": true
            },
    ​
    Here is the metadata for the contact many-to-many link:

    Code:
            "contacts": {
                "type": "linkMultiple",
                "layoutDetailDisabled": false,
                "layoutListDisabled": true,
                "layoutMassUpdateDisabled": false,
                "importDisabled": false,
                "noLoad": false,
                "isCustom": true
            },
    ​
    I will keep tinkering until I figure out what is going on.

    Leave a comment:


  • yuri
    replied
    If it's manual customization, please consider debugging. I'm extremely busy with work these days. From early morning to late night daily

    Leave a comment:


  • yuri
    replied
    Was metadata of these fields edited manually? It's not enough information for me to know what exactly is happening. Metadata of this fields would be helpful to see.

    Leave a comment:


  • bradaks
    replied
    Hello,

    One is a many-to-many and another is a one-to-many relationship.

    Another error 400 is happening on an Enum field. This happens when I attempt to duplicate.

    Error 400: Bad request
    Backend validation failure.

    Field: kitsRequested
    Validation: valid

    ​​
    ​​
    Brad​

    Leave a comment:


  • yuri
    replied
    Hi,

    What field type? What values produce the error?

    Leave a comment:

Working...
X