From cac79b26627340f49192b0b1e8972d28dcd1458a Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 26 Jul 2022 19:56:01 +0100 Subject: [PATCH] Update references to 'workflow' (from old 'valueName' parameter) --- CRM/Campaign/BAO/Petition.php | 4 +-- CRM/Case/BAO/Case.php | 2 +- CRM/Contribute/BAO/ContributionPage.php | 4 +-- CRM/Contribute/BAO/ContributionSoft.php | 2 +- CRM/Contribute/Form/CancelSubscription.php | 2 +- CRM/Contribute/Form/UpdateBilling.php | 2 +- CRM/Contribute/Form/UpdateSubscription.php | 2 +- CRM/Core/BAO/MessageTemplate.php | 11 +++++--- CRM/Core/BAO/UFGroup.php | 2 +- CRM/Event/BAO/Event.php | 2 +- CRM/Event/Form/SelfSvcTransfer.php | 2 +- CRM/Financial/BAO/Payment.php | 2 +- CRM/Friend/BAO/Friend.php | 2 +- CRM/PCP/BAO/PCP.php | 2 +- CRM/PCP/Form/Campaign.php | 2 +- CRM/Pledge/BAO/Pledge.php | 4 +-- api/v3/MessageTemplate.php | 26 +++++++++++++------ .../CRM/Event/Cart/Form/Checkout/Payment.php | 2 +- .../CRM/Core/BAO/MessageTemplateTest.php | 18 ++++++------- 19 files changed, 53 insertions(+), 40 deletions(-) diff --git a/CRM/Campaign/BAO/Petition.php b/CRM/Campaign/BAO/Petition.php index 5d3d55a5f0..d6e688b849 100644 --- a/CRM/Campaign/BAO/Petition.php +++ b/CRM/Campaign/BAO/Petition.php @@ -571,7 +571,7 @@ AND tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )"; CRM_Core_BAO_MessageTemplate::sendTemplate( [ 'groupName' => 'msg_tpl_workflow_petition', - 'valueName' => 'petition_sign', + 'workflow' => 'petition_sign', 'contactId' => $params['contactId'], 'tplParams' => $tplParams, 'from' => "\"{$domainEmailName}\" <{$domainEmailAddress}>", @@ -628,7 +628,7 @@ AND tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )"; CRM_Core_BAO_MessageTemplate::sendTemplate( [ 'groupName' => 'msg_tpl_workflow_petition', - 'valueName' => 'petition_confirmation_needed', + 'workflow' => 'petition_confirmation_needed', 'contactId' => $params['contactId'], 'tplParams' => $tplParams, 'from' => "\"{$domainEmailName}\" <{$domainEmailAddress}>", diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index b2a0db357b..e11b04701a 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -1340,7 +1340,7 @@ HERESQL; list($result[CRM_Utils_Array::value('contact_id', $info)], $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate( [ 'groupName' => 'msg_tpl_workflow_case', - 'valueName' => 'case_activity', + 'workflow' => 'case_activity', 'contactId' => $info['contact_id'] ?? NULL, 'tplParams' => $tplParams, 'from' => $receiptFrom, diff --git a/CRM/Contribute/BAO/ContributionPage.php b/CRM/Contribute/BAO/ContributionPage.php index f184d19116..e47933d76c 100644 --- a/CRM/Contribute/BAO/ContributionPage.php +++ b/CRM/Contribute/BAO/ContributionPage.php @@ -454,7 +454,7 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio // send duplicate alert, if dupe match found during on-behalf-of processing. if (!empty($values['onbehalf_dupe_alert'])) { $sendTemplateParams['groupName'] = 'msg_tpl_workflow_contribution'; - $sendTemplateParams['valueName'] = 'contribution_dupalert'; + $sendTemplateParams['workflow'] = 'contribution_dupalert'; $sendTemplateParams['from'] = ts('Automatically Generated') . " <{$values['receipt_from_email']}>"; $sendTemplateParams['toName'] = $values['receipt_from_name'] ?? NULL; $sendTemplateParams['toEmail'] = $values['receipt_from_email'] ?? NULL; @@ -554,7 +554,7 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio [$displayName, $email] = CRM_Contact_BAO_Contact_Location::getEmailDetails($contribution['contact_id'], FALSE); $templatesParams = [ 'groupName' => 'msg_tpl_workflow_contribution', - 'valueName' => 'contribution_recurring_notify', + 'workflow' => 'contribution_recurring_notify', 'contactId' => $contribution['contact_id'], 'tplParams' => [ 'recur_frequency_interval' => $recur->frequency_interval, diff --git a/CRM/Contribute/BAO/ContributionSoft.php b/CRM/Contribute/BAO/ContributionSoft.php index 56f5251550..ee983c7aa2 100644 --- a/CRM/Contribute/BAO/ContributionSoft.php +++ b/CRM/Contribute/BAO/ContributionSoft.php @@ -666,7 +666,7 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio $domainValues = CRM_Core_BAO_Domain::getNameAndEmail(); $sendTemplateParams = [ 'groupName' => 'msg_tpl_workflow_contribution', - 'valueName' => 'pcp_owner_notify', + 'workflow' => 'pcp_owner_notify', 'contactId' => $contributionSoft['contact_id'], 'toEmail' => $ownerEmail, 'toName' => $ownerName, diff --git a/CRM/Contribute/Form/CancelSubscription.php b/CRM/Contribute/Form/CancelSubscription.php index 529de295e0..281b372683 100644 --- a/CRM/Contribute/Form/CancelSubscription.php +++ b/CRM/Contribute/Form/CancelSubscription.php @@ -263,7 +263,7 @@ class CRM_Contribute_Form_CancelSubscription extends CRM_Contribute_Form_Contrib $sendTemplateParams = [ 'groupName' => $this->_mode == 'auto_renew' ? 'msg_tpl_workflow_membership' : 'msg_tpl_workflow_contribution', - 'valueName' => $this->_mode == 'auto_renew' ? 'membership_autorenew_cancelled' : 'contribution_recurring_cancelled', + 'workflow' => $this->_mode == 'auto_renew' ? 'membership_autorenew_cancelled' : 'contribution_recurring_cancelled', 'contactId' => $this->getSubscriptionDetails()->contact_id, 'tplParams' => $tplParams, 'tokenContext' => ['contribution_recurId' => $this->getContributionRecurID()], diff --git a/CRM/Contribute/Form/UpdateBilling.php b/CRM/Contribute/Form/UpdateBilling.php index 6df7ba092a..272a7ed234 100644 --- a/CRM/Contribute/Form/UpdateBilling.php +++ b/CRM/Contribute/Form/UpdateBilling.php @@ -323,7 +323,7 @@ class CRM_Contribute_Form_UpdateBilling extends CRM_Contribute_Form_Contribution $sendTemplateParams = array( 'groupName' => $this->getSubscriptionDetails()->membership_id ? 'msg_tpl_workflow_membership' : 'msg_tpl_workflow_contribution', - 'valueName' => $this->getSubscriptionDetails()->membership_id ? 'membership_autorenew_billing' : 'contribution_recurring_billing', + 'workflow' => $this->getSubscriptionDetails()->membership_id ? 'membership_autorenew_billing' : 'contribution_recurring_billing', 'contactId' => $this->getSubscriptionDetails()->contact_id, 'tplParams' => $tplParams, 'isTest' => $this->getSubscriptionDetails()->is_test, diff --git a/CRM/Contribute/Form/UpdateSubscription.php b/CRM/Contribute/Form/UpdateSubscription.php index ea02ea7d63..42f956c33d 100644 --- a/CRM/Contribute/Form/UpdateSubscription.php +++ b/CRM/Contribute/Form/UpdateSubscription.php @@ -303,7 +303,7 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Contribute_Form_Contrib $sendTemplateParams = [ 'groupName' => 'msg_tpl_workflow_contribution', - 'valueName' => 'contribution_recurring_edit', + 'workflow' => 'contribution_recurring_edit', 'contactId' => $contactID, 'tplParams' => ['receipt_from_email' => $receiptFrom], 'isTest' => $this->_subscriptionDetails->is_test, diff --git a/CRM/Core/BAO/MessageTemplate.php b/CRM/Core/BAO/MessageTemplate.php index 39228848c7..a34afa9cd7 100644 --- a/CRM/Core/BAO/MessageTemplate.php +++ b/CRM/Core/BAO/MessageTemplate.php @@ -287,8 +287,8 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate implemen $modelDefaults = [ // instance of WorkflowMessageInterface, containing a list of data to provide to the message-template 'model' => NULL, - // Symbolic name of the workflow step. Matches the option-value-name of the template. - 'valueName' => NULL, + // Symbolic name of the workflow step. Matches the value in civicrm_msg_template.workflow_name. + 'workflow' => NULL, // additional template params (other than the ones already set in the template singleton) 'tplParams' => [], // additional token params (passed to the TokenProcessor) @@ -343,7 +343,7 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate implemen $params = array_merge($modelDefaults, $viewDefaults, $envelopeDefaults, $params); CRM_Utils_Hook::alterMailParams($params, 'messageTemplate'); - $mailContent = self::loadTemplate((string) $params['valueName'], $params['isTest'], $params['messageTemplateID'] ?? NULL, $params['groupName'] ?? '', $params['messageTemplate'], $params['subject'] ?? NULL); + $mailContent = self::loadTemplate((string) $params['workflow'], $params['isTest'], $params['messageTemplateID'] ?? NULL, $params['groupName'] ?? '', $params['messageTemplate'], $params['subject'] ?? NULL); self::synchronizeLegacyParameters($params); $rendered = CRM_Core_TokenSmarty::render(CRM_Utils_Array::subset($mailContent, ['text', 'html', 'subject']), $params['tokenContext'], $params['tplParams']); @@ -363,6 +363,9 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate implemen * @param array $params */ private static function synchronizeLegacyParameters(&$params) { + // 'valueName' is deprecated, docs were updated some time back + // and people have been notified. Having it here means the + // hooks will still see it until we remove. CRM_Utils_Array::pathSync($params, ['workflow'], ['valueName']); CRM_Utils_Array::pathSync($params, ['tokenContext', 'contactId'], ['contactId']); CRM_Utils_Array::pathSync($params, ['tokenContext', 'smarty'], ['disableSmarty'], function ($v, bool $isCanon) { @@ -505,7 +508,7 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate implemen // Group name & valueName are deprecated parameters. At some point it will not be passed out. // https://github.com/civicrm/civicrm-core/pull/17180 'groupName' => $groupName, - 'valueName' => $workflowName, + 'workflow' => $workflowName, ]; CRM_Utils_Hook::alterMailContent($mailContent); diff --git a/CRM/Core/BAO/UFGroup.php b/CRM/Core/BAO/UFGroup.php index 2732cf5739..7007ad7114 100644 --- a/CRM/Core/BAO/UFGroup.php +++ b/CRM/Core/BAO/UFGroup.php @@ -2690,7 +2690,7 @@ AND ( entity_id IS NULL OR entity_id <= 0 ) CRM_Core_BAO_MessageTemplate::sendTemplate( [ 'groupName' => 'msg_tpl_workflow_uf', - 'valueName' => 'uf_notify', + 'workflow' => 'uf_notify', 'contactId' => $contactID, 'tplParams' => [ 'displayName' => $displayName, diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 5f0f604cd7..6e31f5bef4 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -1190,7 +1190,7 @@ WHERE civicrm_event.is_active = 1 $sendTemplateParams = [ 'groupName' => 'msg_tpl_workflow_event', - 'valueName' => 'event_online_receipt', + 'workflow' => 'event_online_receipt', 'contactId' => $contactID, 'isTest' => $isTest, 'tplParams' => $tplParams, diff --git a/CRM/Event/Form/SelfSvcTransfer.php b/CRM/Event/Form/SelfSvcTransfer.php index a6db5abdd9..3bc858f0a6 100644 --- a/CRM/Event/Form/SelfSvcTransfer.php +++ b/CRM/Event/Form/SelfSvcTransfer.php @@ -399,7 +399,7 @@ class CRM_Event_Form_SelfSvcTransfer extends CRM_Core_Form { $sendTemplateParams = [ 'groupName' => 'msg_tpl_workflow_event', - 'valueName' => 'event_online_receipt', + 'workflow' => 'event_online_receipt', 'contactId' => $participantDetails[$participant->id]['contact_id'], 'tplParams' => $tplParams, 'from' => $receiptFrom, diff --git a/CRM/Financial/BAO/Payment.php b/CRM/Financial/BAO/Payment.php index 874fc38a28..17b03cec0f 100644 --- a/CRM/Financial/BAO/Payment.php +++ b/CRM/Financial/BAO/Payment.php @@ -281,7 +281,7 @@ class CRM_Financial_BAO_Payment { $sendTemplateParams = [ 'groupName' => 'msg_tpl_workflow_contribution', - 'valueName' => 'payment_or_refund_notification', + 'workflow' => 'payment_or_refund_notification', 'PDFFilename' => ts('notification') . '.pdf', 'contactId' => $entities['contact']['id'], 'toName' => $entities['contact']['display_name'], diff --git a/CRM/Friend/BAO/Friend.php b/CRM/Friend/BAO/Friend.php index 8e92204caa..39a090dc78 100644 --- a/CRM/Friend/BAO/Friend.php +++ b/CRM/Friend/BAO/Friend.php @@ -289,7 +289,7 @@ class CRM_Friend_BAO_Friend extends CRM_Friend_DAO_Friend { $templateParams = [ 'groupName' => 'msg_tpl_workflow_friend', - 'valueName' => 'friend', + 'workflow' => 'friend', 'contactId' => $contactID, 'tplParams' => [ $values['module'] => $values['module'], diff --git a/CRM/PCP/BAO/PCP.php b/CRM/PCP/BAO/PCP.php index c6138349eb..f59b1ea386 100644 --- a/CRM/PCP/BAO/PCP.php +++ b/CRM/PCP/BAO/PCP.php @@ -716,7 +716,7 @@ WHERE pcp.id = %1 AND cc.contribution_status_id = %2 AND cc.is_test = 0"; list($sent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate( [ 'groupName' => 'msg_tpl_workflow_contribution', - 'valueName' => $tplName, + 'workflow' => $tplName, 'contactId' => $pcpInfo['contact_id'], 'tplParams' => $tplParams, 'from' => $receiptFrom, diff --git a/CRM/PCP/Form/Campaign.php b/CRM/PCP/Form/Campaign.php index bf24d4ce25..59421cdd42 100644 --- a/CRM/PCP/Form/Campaign.php +++ b/CRM/PCP/Form/Campaign.php @@ -315,7 +315,7 @@ class CRM_PCP_Form_Campaign extends CRM_Core_Form { list($sent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate( [ 'groupName' => 'msg_tpl_workflow_contribution', - 'valueName' => 'pcp_notify', + 'workflow' => 'pcp_notify', 'contactId' => $contactID, 'from' => "$domainEmailName <$domainEmailAddress>", 'toEmail' => $to, diff --git a/CRM/Pledge/BAO/Pledge.php b/CRM/Pledge/BAO/Pledge.php index 112a3eefe5..2c53936daa 100644 --- a/CRM/Pledge/BAO/Pledge.php +++ b/CRM/Pledge/BAO/Pledge.php @@ -595,7 +595,7 @@ GROUP BY currency [$sent, $subject, $message, $html] = CRM_Core_BAO_MessageTemplate::sendTemplate( [ 'groupName' => 'msg_tpl_workflow_pledge', - 'valueName' => 'pledge_acknowledge', + 'workflow' => 'pledge_acknowledge', 'contactId' => $params['contact_id'], 'from' => $receiptFrom, 'toName' => $pledgerDisplayName, @@ -962,7 +962,7 @@ SELECT pledge.contact_id as contact_id, ] = CRM_Core_BAO_MessageTemplate::sendTemplate( [ 'groupName' => 'msg_tpl_workflow_pledge', - 'valueName' => 'pledge_reminder', + 'workflow' => 'pledge_reminder', 'contactId' => $contactId, 'from' => $receiptFrom, 'toName' => $pledgerName, diff --git a/api/v3/MessageTemplate.php b/api/v3/MessageTemplate.php index b75e43df5b..40a7a55908 100644 --- a/api/v3/MessageTemplate.php +++ b/api/v3/MessageTemplate.php @@ -93,18 +93,27 @@ function civicrm_api3_message_template_send($params) { _civicrm_api3_message_template_send_spec($fieldSpec); foreach ($fieldSpec as $field => $spec) { - if (isset($spec['api.aliases']) && array_key_exists($field, $params)) { + // There is some dark magic going on here. + // The point of the 'api.aliases' metadata is generally + // to ensure that old params can be passed in and they still work. + // However, in this case the api params don't match the BAO + // params so the names that have been determined as + // 'right' for the api are being transformed into + // the 'wrong' BAO ones. It works, it's tested & + // we can do better in apiv4 once we get a suitable + // api there. + if ($spec['name'] !== 'workflow' && isset($spec['api.aliases']) && array_key_exists($field, $params)) { $params[CRM_Utils_Array::first($spec['api.aliases'])] = $params[$field]; unset($params[$field]); } } if (empty($params['messageTemplateID'])) { - if (empty($params['valueName'])) { + if (empty($params['workflow'])) { // Can't use civicrm_api3_verify_mandatory for this because it would give the wrong field names throw new API_Exception( - 'Mandatory key(s) missing from params array: requires id or option_value_name', + 'Mandatory key(s) missing from params array: requires id or workflow', 'mandatory_missing', - ['fields' => ['id', 'option_value_name']] + ['fields' => ['id', 'workflow']] ); } } @@ -126,10 +135,11 @@ function _civicrm_api3_message_template_send_spec(&$params) { $params['id']['api.aliases'] = ['messageTemplateID', 'message_template_id']; $params['id']['type'] = CRM_Utils_Type::T_INT; - $params['option_value_name']['description'] = 'option value name of the template (required if no id supplied)'; - $params['option_value_name']['title'] = 'Option Value Name'; - $params['option_value_name']['api.aliases'] = ['valueName']; - $params['option_value_name']['type'] = CRM_Utils_Type::T_STRING; + $params['workflow']['description'] = 'option value name of the template (required if no id supplied)'; + $params['workflow']['title'] = ts('Workflow'); + $params['workflow']['api.aliases'] = ['option_value_name', 'valueName']; + $params['workflow']['type'] = CRM_Utils_Type::T_STRING; + $params['workflow']['name'] = 'workflow'; $params['contact_id']['description'] = 'contact id if contact tokens are to be replaced'; $params['contact_id']['title'] = 'Contact ID'; diff --git a/ext/eventcart/CRM/Event/Cart/Form/Checkout/Payment.php b/ext/eventcart/CRM/Event/Cart/Form/Checkout/Payment.php index 6c831f3990..b61142c29a 100644 --- a/ext/eventcart/CRM/Event/Cart/Form/Checkout/Payment.php +++ b/ext/eventcart/CRM/Event/Cart/Form/Checkout/Payment.php @@ -341,7 +341,7 @@ class CRM_Event_Cart_Form_Checkout_Payment extends CRM_Event_Cart_Form_Cart { 'is_pay_later' => $this->is_pay_later, 'pay_later_receipt' => $this->pay_later_receipt, ], - 'valueName' => 'event_registration_receipt', + 'workflow' => 'event_registration_receipt', 'PDFFilename' => ts('confirmation') . '.pdf', ]; $template_params_to_copy = [ diff --git a/tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php b/tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php index 0f44b3a9aa..22675616f6 100644 --- a/tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php +++ b/tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php @@ -30,7 +30,7 @@ class CRM_Core_BAO_MessageTemplateTest extends CiviUnitTestCase { 'suffix_id' => NULL, ]); $rendered = CRM_Core_BAO_MessageTemplate::renderTemplate([ - 'valueName' => 'case_activity', + 'workflow' => 'case_activity', 'tokenContext' => [ 'contactId' => $contactId, ], @@ -58,7 +58,7 @@ class CRM_Core_BAO_MessageTemplateTest extends CiviUnitTestCase { ]); [$sent, $subject, $messageText, $messageHtml] = CRM_Core_BAO_MessageTemplate::sendTemplate( [ - 'valueName' => 'case_activity', + 'workflow' => 'case_activity', 'contactId' => $contactId, 'from' => 'admin@example.com', // No 'toEmail'/'toName' address => not sendable, but still returns rendered value. @@ -99,7 +99,7 @@ class CRM_Core_BAO_MessageTemplateTest extends CiviUnitTestCase { [$sent, $subject, $messageText, $messageHtml] = CRM_Core_BAO_MessageTemplate::sendTemplate( [ - 'valueName' => 'case_activity', + 'workflow' => 'case_activity', 'contactId' => $contactId, 'from' => 'admin@example.com', // No 'toEmail'/'toName' address => not sendable, but still returns rendered value. @@ -137,7 +137,7 @@ class CRM_Core_BAO_MessageTemplateTest extends CiviUnitTestCase { [$sent, $subject, $messageText, $messageHtml] = CRM_Core_BAO_MessageTemplate::sendTemplate( [ - 'valueName' => 'case_activity', + 'workflow' => 'case_activity', 'tokenContext' => [ 'contactId' => $contactId, 'activityId' => $activityId, @@ -188,7 +188,7 @@ class CRM_Core_BAO_MessageTemplateTest extends CiviUnitTestCase { $this->assertEquals([], \Civi\Test\Invasive::get([$msg, '_extras'])); [, $subject, $message] = $msg->sendTemplate([ - 'valueName' => 'case_activity', + 'workflow' => 'case_activity', 'from' => 'admin@example.com', 'toName' => 'Demo', 'toEmail' => 'admin@example.com', @@ -217,7 +217,7 @@ class CRM_Core_BAO_MessageTemplateTest extends CiviUnitTestCase { $tokenString = '{domain.' . implode('} ~ {domain.', array_keys($values)) . '}'; $messageContent = CRM_Core_BAO_MessageTemplate::renderTemplate([ - 'valueName' => 'dummy', + 'workflow' => 'dummy', 'messageTemplate' => [ 'msg_html' => $tokenString, // Check the space is stripped. @@ -241,7 +241,7 @@ London, 90210 */ public function testRenderTemplateSmarty(): void { $messageContent = CRM_Core_BAO_MessageTemplate::renderTemplate([ - 'valueName' => 'dummy', + 'workflow' => 'dummy', 'messageTemplate' => [ 'msg_html' => '{$tokenString}', // Check the space is stripped. @@ -261,7 +261,7 @@ London, 90210 */ public function testRenderTemplateIgnoreSmarty(): void { $messageContent = CRM_Core_BAO_MessageTemplate::renderTemplate([ - 'valueName' => 'dummy', + 'workflow' => 'dummy', 'messageTemplate' => [ 'msg_html' => '{$tokenString}', // Check the space is stripped. @@ -308,7 +308,7 @@ London, 90210 $tokenString .= "{$key}:{contact.{$key}}\n"; } $messageContent = CRM_Core_BAO_MessageTemplate::renderTemplate([ - 'valueName' => 'dummy', + 'workflow' => 'dummy', 'messageTemplate' => [ 'msg_html' => $tokenString, // Check the space is stripped. -- 2.25.1