Results 1 to 7 of 7

Thread: post problem

  1. #1
    User
    Join Date
    05-21-18.
    Posts
    126

    Default post problem

    I used this form in my custom CE:

    <form method="post" action="">
    To : <input type="text" name="mail_to"> <br/>
    Subject : <input type="text" name="mail_sub">
    <br/>
    Message <input type="text" name="mail_msg">
    <br/>
    <input type="submit" value="Send Email">
    </form>
    But when i press submit this error message pop-up :

    This error occurs when there is a POST request without valid authentication token. From Contao 2.10, referral check is replaced by the requested token system. If the problem persists, you may be using an incompatible third-party extension or have not updated your version of the Contao system correctly.
    Someone know reason?

  2. #2
    User
    Join Date
    05-21-18.
    Posts
    126

    Default

    Quote Originally Posted by rawelja View Post
    I used this form in my custom CE:

    <form method="post" action="">
    To : <input type="text" name="mail_to"> <br/>
    Subject : <input type="text" name="mail_sub">
    <br/>
    Message <input type="text" name="mail_msg">
    <br/>
    <input type="submit" value="Send Email">
    </form>
    But when i press submit this error message pop-up :

    This error occurs when there is a POST request without valid authentication token. From Contao 2.10, referral check is replaced by the requested token system. If the problem persists, you may be using an incompatible third-party extension or have not updated your version of the Contao system correctly.
    Someone know reason?

    But now i have second problem when i press submit on this form
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    To : <input type="text" name="mail_to"> <br/>
    Subject : <input type="text" name="mail_sub">
    <br/>
    Message <input type="text" name="mail_msg">
    <br/>
    <input type="submit" name="testt"value="Send Email">
    </form>

    i dont get post method. I var_dump($_POST); but 0 parameters after submit. i var_dump request method but method is get somehow

  3. #3
    User
    Join Date
    05-21-18.
    Posts
    126

    Default

    Quote Originally Posted by rawelja View Post
    But now i have second problem when i press submit on this form
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    To : <input type="text" name="mail_to"> <br/>
    Subject : <input type="text" name="mail_sub">
    <br/>
    Message <input type="text" name="mail_msg">
    <br/>
    <input type="submit" name="testt"value="Send Email">
    </form>

    i dont get post method. I var_dump($_POST); but 0 parameters after submit. i var_dump request method but method is get somehow



    Can i fix this
    This error occurs when there is a POST request without valid authentication token. From Contao 2.10, referral check is replaced by the requested token system. If the problem persists, you may be using an incompatible third-party extension or have not updated your version of the Contao system correctly.
    Someone know reason?

    and to get fix geting post instead of get even i typed method = post

  4. #4
    User
    Join Date
    05-21-18.
    Posts
    126

    Default

    Quote Originally Posted by rawelja View Post
    Can i fix this
    This error occurs when there is a POST request without valid authentication token. From Contao 2.10, referral check is replaced by the requested token system. If the problem persists, you may be using an incompatible third-party extension or have not updated your version of the Contao system correctly.
    Someone know reason?

    and to get fix geting post instead of get even i typed method = post
    Solution: $GLOBALS['TL_CONFIG']['disableRefererCheck'] = true;

  5. #5
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    Nope. That would be better:
    PHP Code:
    <input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}"
    Why don't you use the form generator?
    Contao Community Moderator
    → Support options

  6. #6
    User
    Join Date
    05-21-18.
    Posts
    126

    Default

    Quote Originally Posted by xchs View Post
    Nope. That would be better:
    PHP Code:
    <input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}"
    Why don't you use the form generator?
    Becouse i need in backend to modify content on front. When i create with form generator i insert template. I need to modify template in every moment

  7. #7
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    What exactly are you trying to do? Why do you need a custom form in the back end?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •