Body: <p>Got this in the latest CiviCRM  5.69.2, Drupal 10.2.2.  while testing an after-upgrade Contribution pages at <em>/civicrm/contribute/transact?reset=1&amp;id=1</em></p>
  <pre><code>Uncaught ReferenceError: showHideAutoRenew is not defined
  toggleRecur https://www.tld.org/civicrm/contribute/transact?reset=1&amp;id=1:1991
  &lt;anonymous&gt; https://www.tld.org/civicrm/contribute/transact?reset=1&amp;id=1:2041
  jQuery 4
      i
      fireWith
      ready
      J
  </code></pre>
  <p>Searching further, there is this piece of code in the <strong>MainMembershipBlock.tpl</strong></p>
  <blockquote>
  <p>grep -ir &quot;showHideAutoRenew&quot;</p>
  <p>../drupal/vendor/civicrm/civicrm-core/templates/CRM/Contribute/Form/Contribution/MainMembershipBlock.tpl:
  showHideAutoRenew( null );</p>
  <p>../drupal/vendor/civicrm/civicrm-core/templates/CRM/Contribute/Form/Contribution/MainMembershipBlock.tpl:
  function showHideAutoRenew( memTypeId )</p>
  <p>../drupal/vendor/civicrm/civicrm-core/templates/CRM/Contribute/Form/Contribution/Main.tpl:
  showHideAutoRenew(null);</p>
  <p>../drupal/vendor/civicrm/civicrm-core/CRM/Contribute/Form/Contribution/Main.php:
  'onclick' =&gt; &quot;return showHideAutoRenew(CRM.$(this).data('membershipTypeId'));&quot;</p>
  </blockquote>
  <p>What the heck?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-01-18T18:45:37.297Z
Comments.Text: Can you try this PR? https://github.com/civicrm/civicrm-core/pull/29033
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-01-18T19:11:11.540Z
Comments.Text: Thanks, it looks working, there is an "element.click();" in my version of the template, which is not on the PR though
Comments.UserDisplayName: yurg
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-01-18T19:59:11.143Z
Comments.Text: There was an earlier PR too: https://github.com/civicrm/civicrm-core/pull/29016
Comments.UserDisplayName: Demerit
Tags: <upgrade><contribution-page><templates>
Title: showHideAutoRenew is not defined?
ThreadText: # showHideAutoRenew is not defined?
  
  (Asked by: username_0 on 2024-01-18)
  
  Got this in the latest CiviCRM  5.69.2, Drupal 10.2.2.  while testing an after-upgrade Contribution pages at /civicrm/contribute/transact?reset=1&id=1
  Uncaught ReferenceError: showHideAutoRenew is not defined
  toggleRecur https://www.tld.org/civicrm/contribute/transact?reset=1&id=1:1991
   https://www.tld.org/civicrm/contribute/transact?reset=1&id=1:2041
  jQuery 4
      i
      fireWith
      ready
      J
  
  Searching further, there is this piece of code in the MainMembershipBlock.tpl
  
  grep -ir "showHideAutoRenew"
  ../drupal/vendor/civicrm/civicrm-core/templates/CRM/Contribute/Form/Contribution/MainMembershipBlock.tpl:
  showHideAutoRenew( null );
  ../drupal/vendor/civicrm/civicrm-core/templates/CRM/Contribute/Form/Contribution/MainMembershipBlock.tpl:
  function showHideAutoRenew( memTypeId )
  ../drupal/vendor/civicrm/civicrm-core/templates/CRM/Contribute/Form/Contribution/Main.tpl:
  showHideAutoRenew(null);
  ../drupal/vendor/civicrm/civicrm-core/CRM/Contribute/Form/Contribution/Main.php:
  'onclick' => "return showHideAutoRenew(CRM.$(this).data('membershipTypeId'));"
  
  What the heck?
  
  **Tags:** upgrade, contribution-page, templates
  
  > **Comments:**
  > **username_1**: Can you try this PR? https://github.com/civicrm/civicrm-core/pull/29033  
  > **username_0**: Thanks, it looks working, there is an "element.click();" in my version of the template, which is not on the PR though  
  > **username_1**: There was an earlier PR too: https://github.com/civicrm/civicrm-core/pull/29016  
  
  ---
  
  ## 0 answers
  
  