-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
CRM-21788 Clean URLs (Proof of Concept) #123
Conversation
@christianwach Fantastic work. I've built test sites with these patches and they work as expected. I've run upgrades from 4.7.27 to latest master as well as fresh installs. The code looks good and results are as expected. We plan on further testing as this will need a good going through to find any issues. I'd recommend merging this PR and civicrm/civicrm-core#11708 early to get in the next RC. |
Can someone test this with Mosaico? The patch seems to work really well, but when testing Mosaico, CiviMail could not save drafts anymore. It would respond with "Unable to decode supplied JSON". I got lost debugging the json before/after, so before continuing further, I just wanted to make sure it was not a red herring. (I did try to apply the patch, run tests, stash, run tests again, etc, every time with the same result) Update: It seems to be related to the escaping of double-quotes: In the above, the If I load the Mosaico UI, then apply the patch, then send a test, it fails. Likewise, if I apply the patch first, load the UI, remove the patch, then send a test, it works. Update2: reverting these lines fixes it (from
|
civicrm.php
Outdated
if (!empty($cs)) { $_REQUEST['cs'] = $_GET['cs'] = $cs; } | ||
if (!empty($force)) { $_REQUEST['force'] = $_GET['force'] = $force; } | ||
|
||
} | ||
|
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.
Syntax: should be 2 spaces, not 2 tabs?
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.
Gah. Editor defaults to tab-indent. Will rectify.
@mlutfy Thanks for testing.
Cheers, that's a help. I'll test this with Mosaico. |
@mlutfy When you say:
Do you mean "removing these lines"? |
I used:
Instead of:
|
@mlutfy Thanks for clarifying. |
I stumbled on this bug:
The registration works, and is saved in CiviCRM, however, the redirection seems to fail to show the ThankYou page: I get a fatal error with: "Could not find valid value for id". I tested with and without my revert of When inspecting the session, all the controller information is empty, i.e.
Backtrace:
|
@mlutfy Thanks for reporting. Just to be sure - you definitely have this commit in core? That was causing the same problem for me by triggering a browser redirect on account of |
@mlutfy I see no reason not to do so, so I've reverted as per your debugging so that: $_GET = stripslashes_deep( $_GET );
$_POST = stripslashes_deep( $_POST );
$_COOKIE = stripslashes_deep( $_COOKIE );
$_REQUEST = stripslashes_deep( $_REQUEST ); Regarding your Event Registration difficulties, I simply cannot reproduce this locally. Have you been able to test your install to see if there is a redirect happening before you encounter the problem? A good place to start would be logging the URLs in the |
@christianwach Do we want to close this and test off of your fork? It may be better to track as an issue until you feel it is ready to merge. I'd also like to see #125 in sooner rather than laster and that will require this to be rebased cc @mlutfy |
This is one part of the required changes to implement Clean URLs (or at least parity with CiviCRM's URL schema in Drupal) in WordPress. Please refer to the Jira issue for accompanying changes to CiviCRM Core - or visit the PR directly since Jira doesn't seem to have picked it up.
Please note that I do not recommend this as a production-ready PR. I think there's going to be a lot of testing required since there are so many moving parts to this. Any takers? :-)