-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{{post::}} insert tag is not working in 4.6 #58
Comments
@contao/developers Probably caused by our |
🤦♂️ most likely … |
The insert tag should work on the redirect target page of the form (but not on any subsequent page). Can you confirm this? If not, please describe more detailed how to reproduce this. |
I like the change that the insert-tag is only replaced on the redirect-target-page. |
It is, mp_forms manages its own session. |
Steps to reproduce:
I tested this on https://demo.contao.org/ |
Can confirm that e.g. {{post::name}} is also not working on the redirect-target-page. |
We have the same problem! |
The problem is that we no longer access |
How can there something be stored in Maybe we are using the wrong check currently? |
We're not checking if there is a session, but whether the user has a previous session. Which basically means if a session cookie is present. |
We could store the post data as usual in the session and add a response listener which clears the data from the session. This way |
I did know where to start looking but I did not find a way to fix it. There are actually multiple issues here. One is that the |
We can use route attributes, so the fragments requests dont clears the session? Which would potentially result in the session not being cleared (if all main requests are cached), but that's still better than the current, isn't it?
|
No that's not possible. I've tried that but the master response is generated before the ESI responses. Otherwise, how would you know what ESI tags are present? :) So at that point, it's already too late. |
How about rendering the With #204 (comment) the |
I don't think the |
I have another idea which is not ideal but should work: We might add a |
Hm, 10 seconds might not be enough if an SMTP server is involved (though I don't know which times count). At least I had some cases where the SMTP server took very long to actually process the outgoing email and respond. |
Nachdem ich jetzt nochmal alle Rocksolid Anwendung eine nach der anderen gelöscht habe und keine nennenswerte Veränderung der Zeit, bis die Weiterleitungsseite angezeigt wird, feststellen konnte, immer knapp über 10 sec, blieb nur noch das Notification Center als "Fremdlösung" übrig. |
Lade ich das NotificationCenter neu bin ich wieder bei knapp über 10sec bis die Weiterleitungsseite erscheint |
Was hast du denn eingestellt? Als Gateway? Einen eigenen SMTP-Server? |
Standard E-Mail-Gateway |
Ich glaube dein Server hängt einfach ewig beim Mailversand. |
Danke für Deine schnelle Reaktion!
|
Dauert das Abschicken des Formulares auch ohne Notification Center lange, wenn du die Email über die reguläre Contao Funktionalität verschicken lässt? |
wenn ich z.B. einen Newsletter verschicke dauert es in der Tat auch fast 10sec bis der raus ist Wie ich das Formular ohne NFC sende ist mir nicht klar |
Naja - teste es zuerst mal mit dem Formular ;) |
Ich verstehe nicht wirklich was ich machen soll? Kann ich das NFC auch irgendwo "abschalten", ohne zu löschen? |
Die Contao-eigene Funktionalität zum Versenden der Formulardaten via Email benutzen, ohne Notification Center. Einfach nur zum zu bestätigen, dass es am SMTP liegt. |
Die Idee habe ich schon verstanden, nur wie halte ich das NFC dabei raus. |
Einfach deinstallieren.
Und damit wird auch eine Email über den SMTP versendet? |
Okay NFC gelöscht. Aufruf der Weiterleitungsseite dauert jetzt mehr als 16sec, teilweise 20sec .. also noch länger :-( |
Beim ContaoAcademy Formular verlängert sich die Zeit auf 24 sec |
die parameters.yml sieht so aus
fehlt da nicht noch sowas wie |
Ergänze den Eintrag um Was passiert dann? |
Ich habe das mal unten drunter geschrieben und keinen Unterschied festgestellt. |
Hast du danach auch den Symfony Application Cache neu aufbauen lassen? Ohne dieser Angabe hattest du eigentlich bisher nie einen SMTP Server benutzt. |
Beim Deinstallieren habe ich den Cache aufgebaut. Hier bin ich mir jetzt nicht sicher. Vielleicht komme ich heute Nacht nochmal dazu es zu probieren. Dazu aber nochmal die Frage: |
Kleiner Fehler, große Wirkung! Danke an die Helfer und Tippgeber! bei mir bleibt aber eine Frage: Wie und warum wurde die Einstellung wieder revidiert? Wo oder wann hätte ich besser aufpassen müssen. |
Die Versuche es nochmal mit |
Danke dass du mir auch noch den Tipp gegeben hast wie man das Ergebnis verifizieren kann! Ist positiv verlaufen. Vielen, vielen Dank! |
I'm pretty sure @benfolds was not referencing clearing the session to be a workaround. He's referencing that a timed clear is not a very precise solution. When I use a session variable to display a text after a form was submitted then that text will be displayed for every request that's made within the 10 (or however many it's configured to now) seconds. I submit a form, see the message. Go to another page for a second, then come back and I still see "Thanks for submitting the form" or the like. In other cases the request might legitimately take 10+ seconds because someone runs a lot of logic in a protected area that's not exposed to end users, just to users with certain groups. They are fine with a request taking longer, but the developer might want to display session data that is purged in the meantime because another part of the logic took too long. Maybe a bit of a contrived example, but my point is that clearing the session basically asynchronously is not an ideal solution for many use cases, and hard to understand and debug too from the developer's perspective who doesn't know that this time limit exists. |
That's true. However, there's no way to keep that backwards compatible other than the timed solution. Before, the values were kept in the session forever (for as long as the session was valid). Tehre's no way we can determine when to clear it. A better solution would be some special content element that outputs the form details again and then clears the session. But again, that would not have been backwards compatible. |
That reminds me of my suggestion here. The issue was noticed by using the I just don't know if this is something that should remain in userland or if it should be included in Contao. |
Nobody would use that new flag and the cache would always be disabled. That's not really an option. |
Affected version(s)
contao 4.6.x
Description
The {{post::}} insert tag will not be replaced.
How to reproduce
Make a new form, with a form field named "test", then use {{post::test}} to print the content. (checked at demo.contao.org)
This should be the default behaviour.
contao/core-bundle#1230
Maybe related to
contao/core-bundle#1550
The text was updated successfully, but these errors were encountered: