-
Notifications
You must be signed in to change notification settings - Fork 91
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
Create Anonymous user role via wp-cli for E2E test #509
Conversation
I've been experimenting a bit with this and #505. I can confirm locally that this combination produces passing E2E tests: apply #509 and revert civicrm/civicrm-core#16284 (i.e. don't set Turning to the clean-url issue... this is the first time I've tried using clean-urls on WP, and I'm a bit confused. The E2E test is generating a URL with \CRM_Utils_System::url('civicrm/mailing/subscribe', 'reset=1', TRUE, NULL, FALSE) So I hacked in some code to check the environment and see what this URL looks like: public function testSystemRouter() {
print_r([
'CIVICRM_CLEANURL' => \CRM_Utils_Constant::value('CIVICRM_CLEANURL') ? 'true' : 'false',
'url' => \CRM_Utils_System::url('civicrm/mailing/subscribe', 'reset=1', TRUE, NULL, FALSE),
]); Regardless of whether
This leads me a few thought/questions (most unresolved; in no particular order):
|
A couple informational bits - these don't resolve points above but may help with interpreting...
|
@totten Thanks for the detailed analysis. For CleanURLs to work in WP, we have to flkush WP's rewrite rules. This is done in the plugin and on the first page load of CiviCRM. If I build wp-demo with master, and after the build I go to the site and do not login, the shortcode URLS work. The Ugly URLs do not. This is due to the basepage not being ready. Once I log in Then the Ugly URLs work. I have to load CiviCRM to get CLEANURLs to not 404. This is not an issue on a UI install as we load CiviCRM after install. Further with CLEANURLs set to false, I still get 404 errors on any page that uses the basepage if there has been no WP login by an admin. In either case logging in allows all URLs to work. This matches Tim's results above. The issue is the basepage is missing from the URLs, I have not found what we need to do for automated cli testing. I'll keep digging. I believe this is all related to the current way we create the basepage and that we rely on the UI loads. I'll keep digging. Thanks for the push in the right direction.
The above results are consistent in 5.22 (stable) as well as master. I am surprised the E2E tests were passing. |
alternative to #505