{"action":"created","issue":{"url":"https://api.github.com/repos/mautic/mautic/issues/5007","repository_url":"https://api.github.com/repos/mautic/mautic","labels_url":"https://api.github.com/repos/mautic/mautic/issues/5007/labels{/name}","comments_url":"https://api.github.com/repos/mautic/mautic/issues/5007/comments","events_url":"https://api.github.com/repos/mautic/mautic/issues/5007/events","html_url":"https://github.com/mautic/mautic/issues/5007","id":260038992,"number":5007,"title":"Can't send form via AJAX request","user":{"login":"williamknn","id":3988151,"avatar_url":"https://avatars2.githubusercontent.com/u/3988151?v=4","gravatar_id":"","url":"https://api.github.com/users/williamknn","html_url":"https://github.com/williamknn","followers_url":"https://api.github.com/users/williamknn/followers","following_url":"https://api.github.com/users/williamknn/following{/other_user}","gists_url":"https://api.github.com/users/williamknn/gists{/gist_id}","starred_url":"https://api.github.com/users/williamknn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williamknn/subscriptions","organizations_url":"https://api.github.com/users/williamknn/orgs","repos_url":"https://api.github.com/users/williamknn/repos","events_url":"https://api.github.com/users/williamknn/events{/privacy}","received_events_url":"https://api.github.com/users/williamknn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-09-23T21:13:47Z","updated_at":"2017-09-25T02:43:59Z","closed_at":null,"author_association":"NONE","body":"What type of report is this:\r\n\r\n| Q  | A\r\n| ---| ---\r\n| Bug report? | Y\r\n| Feature request? | N\r\n| Enhancement? | N\r\n\r\n## Description:\r\nI've installed a Bitnami AMI for Mautic. Imported my leads and created two forms, but I can't send info to the forms. Here is how I'm sending my user's information (AngularJS 1.4.9):\r\n```javascript\r\nvar saveMauticSignupEmail = $scope.saveMauticSignupEmail = function()\r\n        {\r\n            var p1 = { ok: 1 };\r\n            $http.post('http://mautic.xxxx.com.br/form/submit?formId=2', \r\n                {\r\n                    data: 'mauticform[email]=' + $scope.info.email + '&mauticform[utm_source]=' + mautic.utm_source + '&mauticform[utm_medium]=' + mautic.utm_medium + '&mauticform[utm_campaign]=' + mautic.utm_campaign + '&mauticform[utm_term]=' + mautic.utm_term + '&mauticform[utm_content]=' + mautic.utm_content + '&mauticform[formId]=2&mauticform[return]=' + p1 + '&mauticform[submit]=' + 1 + '&mauticform[formName]=cadastrosoemaillandingpageprincipal',\r\n                    dataType: 'json',\r\n                    headers: {\r\n                        'Accept': 'application/json',\r\n                        'Content-Type': 'application/x-www-form-urlencoded'\r\n                    }\r\n                }).success(function(response)\r\n                {\r\n                   registerInfo($scope.info);\r\n                }).error(function(response)\r\n                {\r\n                    registerInfo($scope.info);\r\n                });\r\n        };\r\n```\r\n\r\n## Response of the request:\r\n`mauticError:This form is no longer available.`\r\nNote: All my forms are PUBLISHED.\r\n\r\n## If a bug:\r\n\r\n| Q   | A\r\n| --- | ---\r\n| Mautic version | 2.10.1\r\n| PHP version | 7.0.23\r\n\r\n### Steps to reproduce:\r\n1. Fill email field and click Register. The click event will trigger the function above.\r\n \r\n### Log errors: \r\nApache access.log file:\r\n`200.148.3.15 - - [23/Sep/2017:21:05:43 +0000] \"OPTIONS /form/submit?formId=2 HTTP/1.1\" 204 -`\r\n`200.148.3.15 - - [23/Sep/2017:21:05:43 +0000] \"POST /form/submit?formId=2 HTTP/1.1\" 302 608`\r\n\r\nMautic Log:\r\n`[2017-09-23 17:28:42] mautic.WARNING: IP LOOKUP: The file \"/opt/bitnami/apps/mautic/htdocs/app/cache/prod/../ip_data/GeoLite2-City.mmdb\" does not exist or is not readable. [] []`\r\n"},"comment":{"url":"https://api.github.com/repos/mautic/mautic/issues/comments/331763659","html_url":"https://github.com/mautic/mautic/issues/5007#issuecomment-331763659","issue_url":"https://api.github.com/repos/mautic/mautic/issues/5007","id":331763659,"user":{"login":"cklingsporn","id":19943672,"avatar_url":"https://avatars1.githubusercontent.com/u/19943672?v=4","gravatar_id":"","url":"https://api.github.com/users/cklingsporn","html_url":"https://github.com/cklingsporn","followers_url":"https://api.github.com/users/cklingsporn/followers","following_url":"https://api.github.com/users/cklingsporn/following{/other_user}","gists_url":"https://api.github.com/users/cklingsporn/gists{/gist_id}","starred_url":"https://api.github.com/users/cklingsporn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cklingsporn/subscriptions","organizations_url":"https://api.github.com/users/cklingsporn/orgs","repos_url":"https://api.github.com/users/cklingsporn/repos","events_url":"https://api.github.com/users/cklingsporn/events{/privacy}","received_events_url":"https://api.github.com/users/cklingsporn/received_events","type":"User","site_admin":false},"created_at":"2017-09-25T02:43:59Z","updated_at":"2017-09-25T02:43:59Z","author_association":"CONTRIBUTOR","body":"If it helps, this error (This form is no longer available.) comes around in only 3 cases.\r\n\r\n- If mauticform[formId] is not set on the submission\r\n- If when looking up the form by id from mauticform[formId] no form was found\r\n- If the selected form status is not in [pending, expired, published]\r\n\r\nI'd suggest looking at/showing us the actual values which are being sent to the server, see what that 'data:' string is actually generating when being sent, otherwise double checking the status of the form."}}
{"actor":{"display_login":"cklingsporn"}}