From 37db45bb9fc26703bb3d5bc37a879b939299b905 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 1 Jul 2022 16:56:50 +1200 Subject: [PATCH] dev/core#3707 Fix wordpress issue of page not refreshing after import --- CRM/Custom/Import/Form/DataSource.php | 3 ++- CRM/Import/Form/DataSource.php | 7 ------- CRM/Import/Form/Preview.php | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/CRM/Custom/Import/Form/DataSource.php b/CRM/Custom/Import/Form/DataSource.php index 20eb8340a9..dd0d8d7539 100644 --- a/CRM/Custom/Import/Form/DataSource.php +++ b/CRM/Custom/Import/Form/DataSource.php @@ -81,7 +81,8 @@ class CRM_Custom_Import_Form_DataSource extends CRM_Import_Form_DataSource { */ public function buildQuickForm() { parent::buildQuickForm(); - + // Perhaps never used, but permits url passing of the group. + $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE); $multipleCustomData = CRM_Core_BAO_CustomGroup::getMultipleFieldGroup(); $this->assign('fieldGroups', $multipleCustomData); $this->add('select', 'multipleCustomData', ts('Multi-value Custom Data'), ['' => ts('- select -')] + $multipleCustomData, TRUE); diff --git a/CRM/Import/Form/DataSource.php b/CRM/Import/Form/DataSource.php index 3036a38c4d..ca33c0bceb 100644 --- a/CRM/Import/Form/DataSource.php +++ b/CRM/Import/Form/DataSource.php @@ -23,13 +23,6 @@ abstract class CRM_Import_Form_DataSource extends CRM_Import_Forms { * Set variables up before form is built. */ public function preProcess() { - $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE); - $params = "reset=1"; - if ($this->_id) { - $params .= "&id={$this->_id}"; - } - CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url(static::PATH, $params)); - // check for post max size CRM_Utils_Number::formatUnitSize(ini_get('post_max_size'), TRUE); $this->assign('importEntity', $this->getTranslatedEntity()); diff --git a/CRM/Import/Form/Preview.php b/CRM/Import/Form/Preview.php index 92959b8357..5fff559d0a 100644 --- a/CRM/Import/Form/Preview.php +++ b/CRM/Import/Form/Preview.php @@ -141,7 +141,7 @@ abstract class CRM_Import_Form_Preview extends CRM_Import_Forms { 'onEndUrl' => CRM_Utils_System::url('civicrm/import/contact/summary', [ 'user_job_id' => $this->getUserJobID(), 'reset' => 1, - ]), + ], FALSE, NULL, FALSE), ]); $runner->runAllViaWeb(); } -- 2.25.1