Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have strange problem: i have dev version on pc on localhost and it;s work but after uploading on hosting on every form i have error:

The CSRF token is invalid. Please try to resubmit the form. 

I tryied repload, delete cache and everytime the same error on all forms. I have another application uploaded on the same hosting 2 months ago and everything works fine:

One of my forms:

{% block body %}
    <h1>Formularz Kontaktowy</h1>
    {% form_theme contactForm 'bootstrap_4_layout.html.twig' %}
    {{ form_start(contactForm) }}
    {{ form_row(contactForm.name) }}
    {{ form_row(contactForm.email) }}
    {{ form_row(contactForm.subject) }}
    {{ form_row(contactForm.body) }}
    {{ form_row(contactForm.submit) }}
    {{ form_end(contactForm) }}
{% endblock %}


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.6k views
Welcome To Ask or Share your Answers For Others

1 Answer

Problem solved ! i need to type my page adress by https not http !


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...