Announcement

Collapse
No announcement yet.

Can't Create Lead Entity, Bad Server Response...

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

  • Can't Create Lead Entity, Bad Server Response...

    I've been able to create any Entity until recently, now I can create anything but Leads. Whenever I try to create an entity it will not save the entity, and pops up with a box saying bad server response. Regardless of whether I try and create the entity in small or large detail creator. Now I also receive a bad server response pop up when I sign in, click on the opportunities or tasks tabs, or create any entity... now the rest of the website runs perfectly fine no server errors... any advice? I desperately need to create leads

    thank you in advance!

  • #2
    the log says

    (
    [controller] => Lead
    )
    , InputData: - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'php.m_opportunity' doesn't exist [] []
    [2015-07-09 15:46:17] Espo.ERROR: Display Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'php.m_opportunity' doesn't exist, Code: 42S02 URL: /api/v1/Lead?maxSize=40&offset=0&sortBy=createdAt&asc=fals e [] []
    [2015-07-09 15:46:43] Espo.ERROR: API [POST]:/:controller, Params:Array
    (
    [controller] => Lead
    )
    , InputData: {"assignedUserId":"559e779609982b264","assignedUse rName":"mariella tes","firstName":"test","lastName":"test","status" :"New","salutationName":"","accountName":"test","e mailAddressData":[{"emailAddress":"test@ggmail.com","primary":true," optOut":false,"invalid":false}],"emailAddress":"test@ggmail.com","phoneNumberData ":[],"phoneNumber":null,"title":"","doNotCall":false," addressPostalCode":"","addressStreet":"","addressS tate":"","addressCity":"","addressCountry":"","web site":"","source":"","opportunityAmount":null,"opp ortunityAmountCurrency":null,"campaignName":null," campaignId":null,"description":"","teamsIds":[],"teamsNames":{}} - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'php.m_opportunity' doesn't exist [] []
    [2015-07-09 15:46:43] Espo.ERROR: Display Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'php.m_opportunity' doesn't exist, Code: 42S02 URL: /api/v1/Lead [] []
    [2015-07-09 15:46:45] Espo.ERROR: API [POST]:/:controller, Params:Array
    (
    [controller] => Lead
    )

    I deleted m_opprituniy but it still claims the link exists... where could i find the files and or lines i need to delete to remove the link? and would doing so solve my problem?

    Comment


    • #3
      Now I'm also seeing this problem with my contacts, and accounts because

      (
      [controller] => Contact
      )
      , InputData: - SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'contact' [] []
      [2015-07-10 00:28:02] Espo.ERROR: Display Error: SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'contact', Code: 42000 URL: /api/v1/Contact?maxSize=40&offset=0&sortBy=name&asc=true [] []
      [2015-07-10 00:28:07] Espo.ERROR: API [GET]:/:controller, Params:Array
      (
      [controller] => Account
      )
      , InputData: - SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'account' [] []
      [2015-07-10 00:28:07] Espo.ERROR: Display Error: SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'account', Code: 42000 URL: /api/v1/Account?maxSize=5&offset=0&sortBy=name&asc=true [] []
      [2015-07-10 00:28:34] Espo.ERROR: API [GET]:/:controller, Params:Array

      Comment


      • #4
        also tasks...

        (
        [controller] => Task
        )
        , InputData: - SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'task' [] []
        [2015-07-10 00:16:38] Espo.ERROR: Display Error: SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'task', Code: 42000 URL: /api/v1/Task?maxSize=5&offset=0&sortBy=dateEnd&asc=true&wh ere%5B0%5D%5Btype%5D=bool&where%5B0%5D%5Bvalue%5D% 5B%5D=onlyMy&where%5B1%5D%5Btype%5D=primary&where% 5B1%5D%5Bvalue%5D=actual [] []
        [2015-07-10 00:22:08] Espo.ERROR: API [GET]:/:controller, Params:Array

        Comment


        • #5
          Try to make rebuild via Administration or via command line (php rebuild.php).
          I think, you have created a field with the MySQL reserved name. Please check your custom fields.
          Job Offers and Requests

          Comment


          • #6
            The Issue with leads though was resolved with a rebuild because it just needed to delete the link to the entity i deleted called m_oppritunity, so thank you so much for that!

            I ran rebuild via administration, and my only custom field for accounts is a link to accounts so that i can have sub accounts for any account, same with tasks for subtasks, and same with contacts for subcontacts. A many to one and a one to many link to itself is the only thing that I added to those entities so I don't why would cause this error... the only fields I have for them that share the same name as a mysql reserved name or keyword are fields already exists that I can't delete or edit through entity manager, so I don't know why those would cause a problem... any advice on how to fix this?

            thank you in advance!

            Comment


            • #7
              the reserved names that are fields that already exist are fields such as Name, etc.

              Comment


              • #8
                I now get the following errors

                (
                [controller] => Lead
                [id] => 559fc86180864c48a
                [link] => tasks
                )
                , InputData: - SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'task' [] []
                [2015-07-10 13:28:02] Espo.ERROR: Display Error: SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'task', Code: 42000 URL: /api/v1/Lead/559fc86180864c48a/tasks?maxSize=5&offset=0&sortBy=createdAt&asc=fals e&where%5B0%5D%5Btype%5D=primary&where%5B0%5D%5Bva lue%5D=Actual [] []
                [2015-07-10 13:36:59] Espo.ERROR: API [GET]:/:controller, Params:Array

                (
                [controller] => Task
                )
                , InputData: - SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'task' [] []
                [2015-07-10 13:37:43] Espo.ERROR: Display Error: SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'task', Code: 42000 URL: /api/v1/Task?maxSize=5&offset=0&sortBy=createdAt&asc=false [] []

                Comment

                Working...
                X