Fix last notices on Online event registration by removing variables
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 18 Sep 2023 10:32:01 +0000 (22:32 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 18 Sep 2023 10:32:04 +0000 (22:32 +1200)
I hunted through to see why these variables are assigned
and they pre-date the switch to load the payment block from the

CRM_Financial_Form_Payment

There is no evidence of that form looking them up in
any way - so I think they can go....
https://github.com/civicrm/civicrm-core/commit/aaff4c697d6f94f01f5dacf5a3d876a95e50f5cb#diff-660258b71b4d1db49bdef38c7b3fcb4b698004ab39b57dcbd49083e256444272

templates/CRM/common/paymentBlock.tpl

index 1130a5177e7f70702feff6f9a437e7fa6246a28d..7844e4a7e50f34892366a56fee7cb219a4a2261d 100644 (file)
     function buildPaymentBlock(type) {
       var $form = $('#billing-payment-block').closest('form');
       {/literal}
-      {if !$isBackOffice && $contributionPageID}
-        {capture assign='contributionPageID'}&id={$contributionPageID}{/capture}
-      {else}
-        {capture assign='contributionPageID'}{/capture}
-      {/if}
       {if !$isBackOffice && $custom_pre_id}
         {capture assign='preProfileID'}&pre_profile_id={$custom_pre_id}{/capture}
       {else}
         {capture assign='preProfileID'}{/capture}
       {/if}
-      {if $urlPathVar}
-        {capture assign='urlPathVar'}&{$urlPathVar}{/capture}
-      {else}
-        {capture assign='urlPathVar'}{/capture}
-      {/if}
       {* Billing profile ID is only ever set on front end forms, to force entering address for pay later. *}
       {if !$isBackOffice && $billing_profile_id}
         {capture assign='profilePathVar'}&billing_profile_id={$billing_profile_id}{/capture}
       var currency = '{$currency}';
       currency = currency == '' ? $('#currency').val() : currency;
 
-      var dataUrl = "{crmURL p='civicrm/payment/form' h=0 q="formName=`$form.formName``$urlPathVar``$isBackOfficePathVar``$profilePathVar``$contributionPageID``$preProfileID`"}";
+      var dataUrl = "{crmURL p='civicrm/payment/form' h=0 q="formName=`$form.formName``$isBackOfficePathVar``$profilePathVar``$preProfileID`"}";
       {literal}
       if (typeof(CRM.vars) != "undefined") {
         if (typeof(CRM.vars.coreForm) != "undefined") {