No announcement yet.

Cannot add a field to entity: Bad server response

  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot add a field to entity: Bad server response

    Cannot add a field to entity due to "Bad server response". Trying to create field again and it is saying that field already exists.
    CRM version: 5.3.6
    php: 7.2, MySQL: 5.6

    [2019-06-22 08:59:45] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"D:\\OSPanel\\domains\\crm-orig\\application\\Espo\\Core\\Utils\\Database\\Sc hema\\Converter.php","line":316,"context"... (full log attached)
    [2019-06-22 09:00:50] Espo.ERROR: API [POST]:/Admin/fieldManager/:scope, Params:Array ( [scope] => Lead ) , InputData: {"type":"varchar","required":false,"trim":true,"dy namicLogicVisible":null,"dynamicLogicRequired":nul l,"dynamicLogicReadOnly":null,"name":"qwe","label" :"Qwe","maxLength":10,"tooltipText":"","isPersonal Data":false,"default":"","audited":false,"readOnly ":false,"tooltip":false} - Field [qwe] exists in Lead [] []

    [2019-06-22 09:00:50] Espo.ERROR: Display Error: Field [qwe] exists in Lead, Code: 409 URL: /api/v1/Admin/fieldManager/Lead [] []
    Attached Files

  • #2
    I see that you are trying to add the field that already exists.


    • Anatoleq
      Anatoleq commented
      Editing a comment
      First attempt failed with 500 error and new field is not displayed on UI. If try to add field with the same name it says "field already exists"

  • #3
    Could you check in your DB, does this field exist? Whether yes, make a rebuild (Administration -> rebuild).


    • #4
      Administration -> rebuild also throws 500 error, in database i don't see any updates, however, if I go to Leads -> fields, i can see the new field.
      No error logs in "data" folder


      • #5
        Ok, another one error in your log is up to a relation between the Account and Lead entities of the Many-to-Many type. It called 'leadAccount'. If you do not use it, delete it. I think it is the cause of the error.