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
Use site_url to build form cache #7193
Use site_url to build form cache #7193
Conversation
This has been reviewed by our team in production for a while now so labeling as pending test confirmation. |
This PR resolve same issue #6752 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works thanks.
} | ||
|
||
if ('dev' === MAUTIC_ENV) { | ||
$this->baseUrl = '/index_dev.php'.$this->baseUrl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't appear to work for any dev site that isn't at root.
For example, all mautibox PRs now redirect haphazardly:
https://mautibox.com/index_dev.php/7210/s/dashboard
Can we remove this? I don't see it as needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alanhartless what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll be a pain for developing if none of the URLs you click on has index_dev.php
in it. I'd rather fix this to work with paths than just remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed... will you be doing that or should I?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be sure you are submitting this against the staging branch.
Description:
When URLs are generated through the router in a web request, the router uses the request to set host, etc. This is normally fine except when you can access the site through multiple URLs (http, https). For forms, the HTML is cached with an action of whatever URL is used to access Mautic. If this mismatches the site_url, the form will fail to submit.
Steps to reproduce the bug:
Steps to test this PR: