From 2390319eaf99217c573f798a44cb240a84cbf9d6 Mon Sep 17 00:00:00 2001 From: Kevin Cristiano Date: Fri, 8 Jun 2018 07:05:48 -0400 Subject: [PATCH] CRM-21812 - don't specify installation type post install props @MegaphoneJon The wp-cli-login-server plugin checks for the presence of elements in the $_GET array, and fails if any are found. This conflicts with CiviCRM, which places: $_GET['civicrm_install_type'] = 'wordpress'; into every page load. I confirmed that this value is only used for install, and placed a conditional around it to only insert pre-install. I successfully installed CiviCRM and engaged in normal use with the conditional applied, and confirmed that this fixed the WP plugin. This is intended to close aaemnnosttv/wp-cli-login-command#24. Signed-off-by: Kevin Cristiano --- civicrm.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/civicrm.php b/civicrm.php index 19311202b..e08db8faf 100644 --- a/civicrm.php +++ b/civicrm.php @@ -309,7 +309,9 @@ public function setup_instance() { if ( $this->civicrm_in_wordpress() ) { // this is required for AJAX calls in WordPress admin $_GET['noheader'] = TRUE; - } else { + } + + if ( !CIVICRM_INSTALLED && !$this->civicrm_in_wordpress() ) { $_GET['civicrm_install_type'] = 'wordpress'; }