-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Fixing invalid Page redirects #14551
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
Conversation
Maut 12024 - Fixing invalid Page redirects
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 6.x #14551 +/- ##
============================================
+ Coverage 64.47% 64.54% +0.06%
- Complexity 34613 34614 +1
============================================
Files 2271 2271
Lines 103439 103442 +3
============================================
+ Hits 66692 66766 +74
+ Misses 36747 36676 -71
|
@escopecz I'm confused on how to go about testing this pr. On step 3, you said "Set the Redirect and do not set the redirect URL (it will not allow you to save such state with this PR)" so do I leave the redirect type field as no redirect? since I can't save the landing page without setting the redirect url if the redirect is set. |
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.
Code looks good.
I did basic tests, works.
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.
Verified that this issue is reproducible on old branches and after applying this PR issue is resolved and validation message showing URL is required.
Thanks @escopecz!
@imaabasiee thanks for testing! This PR is adding a validation so this invalid state couldn't happen for new entities. But before this change was applied you could do that. So you'd have to replicate it on some other PR. I'm merging this as it has 2 approvals. Thanks everyone! |
Description:
This PR fixes this error:
It uncovered that Landing Pages with configured redirect can be saved in an inconsistent state without the URL to redirect to. This PR fixes this to redirect to the 404-not found page instead instead of throwing the 500 error. And for the new pages it adds a validation to stop users creating such landing pages.
Plus:
http://
to it and made it a valid URL. This behavior was removed and instead the validation message will be shown.Steps to test this PR:
Other areas of Mautic that may be affected by the change:
List deprecations along with the new alternative:
List of areas covered by the unit and/or functional tests: