Only GET request allowed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • serqet
    Senior Member
    • Feb 2019
    • 109

    Only GET request allowed

    Hi Guys,

    I always write about my problems, this time first thank you very much for your efforts. ESPO is truly a legend.

    As for my problem after upgrading to 6.0.8, the register function described in the link does not work anymore, the error log is below. I ask for your help.

    Thank you.


    [2020-12-16 20:29:22] Espo.ERROR: Uncaught Exception Espo\Core\Exceptions\Error: "Only GET request allowed for entry points." at /var/www/vhosts/crm.***.com.tr/httpdocs/application/Espo/Core/ApplicationRunners/EntryPoint.php line 111 {"exception":"[object] (Espo\\Core\\Exceptions\\Error(code: 500): Only GET request allowed for entry points. at /var/www/vhosts/crm.***.com.tr/httpdocs/application/Espo/Core/ApplicationRunners/EntryPoint.php:111)"} []

    yuri
    telecastg
    Maximus
    This is the continuation of the previous thread: https://forum.espocrm.com/forum/deve...ng-page-part-1 (https://forum.espocrm.com/forum/developer-help/58111-tutorial-implement-a-self-registration-button-in-a-custom-landing-page-part-1) Due to the length of the additional scripts required, I opted for saving them in GitHub
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    Hi,

    You have something that sends POST request to EntryPoint that is not allowed as of v6.0. EntryPoints can accept only GET. If you have VoIP extension you need to upgrade it.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • serqet
      Senior Member
      • Feb 2019
      • 109

      #3
      I don't have the VOIP extension, the extensions I have are like in the picture. So will I no longer be able to use this customization yuri ?


      Click image for larger version

Name:	image.png
Views:	321
Size:	7.9 KB
ID:	65598

      Comment


      • yuri
        yuri commented
        Editing a comment
        These extensions should work fine.
    • telecastg
      Active Community Member
      • Jun 2018
      • 907

      #4
      Hello serqet

      As yuri indicated, Espo entry points no longer accept Ajax "POST" calls, only "GET" calls, so you will need to modify this function https://github.com/telecastg/espocrm...equest.js#L173 to make the Ajax call to the entry point a GET request instead of a POST request.

      Essentially, the difference between a POST call and a GET call is that in a POST call, parameters are sent to the server as a "stringified" JSON object (payload) and in a GET request parameters are appended to the url.

      If you don't know how to do this (change the Ajax call to "GET" instead of "POST"), you can check this article https://www.w3schools.com/xml/dom_httprequest.asp to learn more about Ajax calls.

      I haven't tested the script with the above modification but it should work.

      Comment


      • crmclients
        crmclients commented
        Editing a comment
        Could this be why I can get a lead from FormAssembly to send to Espo and have a Lead created?

        Options are POST/GET/PUT - but still nothing works with FormAssembly - not sure why Contact7 works as it's JSON

        however I am testing that with version 5.9.4
        ----------------------------------------------------------------------------------------------------------------------------------------

        Apr 2023 *** works ok now and detailed it here: https://forum.espocrm.com/forum/deve...1290#post91290
        Last edited by crmclients; 04-21-2023, 03:58 AM.

      • telecastg
        telecastg commented
        Editing a comment
        Hello crmclients I am not familiar with FormAssembly
    • yuri
      Member
      • Mar 2014
      • 8440

      #5
      Instead of sending POST to EntryPoint it's recommend to create an API action https://github.com/espocrm/documenta...ion.md#routing.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      Working...