contao / core-bundle

[READ-ONLY] Contao Core Bundle
GNU Lesser General Public License v3.0
123 stars 58 forks source link

Prevent message-stack from being consumed before reload #1693

Closed martinschumann closed 5 years ago

martinschumann commented 5 years ago

Messages get lost e.g. in the backend user profile when purging session and cache data, when Contao\Message::generate() is called with it's underlying flash message in post submits with subsequent reload.

In Contao 3 excluding post submits from message consumption resides in Contao\Message::generate().

aschempp commented 5 years ago

Please create pull requests to contao/contao and not the split repositories.

leofeyer commented 5 years ago

@martinschumann If you do not want to recreate the PR, I can adopt the changes directly in the correct branch and repo. Otherwise, please use empty($_POST) instead of (\Environment::get('requestMethod') !== 'POST'.

martinschumann commented 5 years ago

I'll recreate PR. Even just to practice …