Answers.Body: <p>Came across this annoying error after installing webform_civicrm on Drupal 9 and testing a donation.</p>
  <p>It was simply a case of running the <code>cv flush</code> command followed by <code>drush cr</code></p>
  <p>Hope this helps!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-30T14:27:20.017Z
Answers.LastActivityDate: 2023-03-30T14:27:20.017Z
Answers.UserDisplayName: Darren
Body: <p>I am getting this - "Error: CRM.url called before initialization"
  when I select the country from 'country field' included in the profile.</p>
  
  <p>Steps to replicate:</p>
  
  <blockquote>
    <ul>
    <li>Created a profile including address fields street, pincode, country, states, city</li>
    <li>created a contribution page.</li>
    <li>added profile for that contribution page.</li>
    <li>Opened "contribution link" for live mode.</li>
    <li>Try to change the country name state/province field keep spinning.</li>
    </ul>
  </blockquote>
  
  <p><a href="https://i.sstatic.net/gKSGW.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/gKSGW.png" alt="enter image description here"></a></p>
  
  <p>What will be the issue? </p>
  
  <p>reference file:civicrm/js/crm.ajax.js</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-06-05T11:20:02.277Z
Comments.Text: Make sure js files are loaded before the page load. Try changing the theme to default and confirm if you still see the issue
Comments.UserDisplayName: jitendra - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-06-05T11:37:35.873Z
Comments.Text: Yes, @jitendra-fuzion...  I have just checked this possibility. Basically, this error title is mentioned in the file - civicrm/js/crm.ajax.js. 
  
  The common.js and crm.ajax.js is loaded inside <head> tag. I have just checked this by doing view source.
Comments.UserDisplayName: 1990rk4
Tags: <profile><contribution-page><addresses>
Title: "Error: CRM.url called before initialization" on contribution page
ThreadText: # "Error: CRM.url called before initialization" on contribution page
  
  (Asked by: username_0 on 2019-06-05)
  
  I am getting this - "Error: CRM.url called before initialization"
  when I select the country from 'country field' included in the profile.
  
  Steps to replicate:
  
  > * Created a profile including address fields street, pincode, country, states, city
  > * created a contribution page.
  > * added profile for that contribution page.
  > * Opened "contribution link" for live mode.
  > * Try to change the country name state/province field keep spinning.
  
  [![enter image description here](https://i.sstatic.net/gKSGW.png)](https://i.sstatic.net/gKSGW.png)
  
  What will be the issue?
  
  reference file:civicrm/js/crm.ajax.js
  
  **Tags:** profile, contribution-page, addresses
  
  > **Comments:**
  > **username_1**: Make sure js files are loaded before the page load. Try changing the theme to default and confirm if you still see the issue  
  > **username_0**: Yes, @jitendra-fuzion...  I have just checked this possibility. Basically, this error title is mentioned in the file - civicrm/js/crm.ajax.js.   The common.js and crm.ajax.js is loaded inside <head> tag. I have just checked this by doing view source.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-03-30. Score: 0
  
  Came across this annoying error after installing webform\_civicrm on Drupal 9 and testing a donation.
  
  It was simply a case of running the `cv flush` command followed by `drush cr`
  
  Hope this helps!
  
  
  ---
  
  