Answers.Body: <p>Welcome to SE!  Check your Extension Resource URL at <code>Administer &gt; System Settings &gt; Resource URL's</code>  </p>
  
  <p>A typical WP install would show the Extension Resource URL as <code>[civicrm.files]/ext</code> where <code>[civicrm.files]</code> is <code>https://example.org/wp-content/uploads/civicrm</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-31T15:37:29.450Z
Answers.Text: I believe it is correct - the extension php is loading, but the when civi is asked to serve the resource it doesn't.  I guess specifically, CRM_Core_Resources::singleton()->addScriptFile('com.drastikbydesign.stripe', 'js/civicrm_stripe.js') is not working.
Answers.UserDisplayName: Derek S.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-04T02:15:58.453Z
Answers.Text: In the end I could get this to work by removing civi from the path and I'll hope that's right! :)  Thanks.
Answers.UserDisplayName: Derek S.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-31T08:42:17.163Z
Answers.LastActivityDate: 2019-01-31T08:42:17.163Z
Answers.UserDisplayName: Aidan
Answers.Body: <p>WordPress/CiviCRM can have trouble resolving tokens like <code>[civicrm.files]</code> if you have a symlink in your path.</p>
  
  <p>If you're having resource URL issues, I recommend replacing the tokens with absolute paths (with no symlinks) in <strong>Administer » System Settings » Directories</strong> as well as checking <strong>Administer » System Settings » Resource URLs</strong> as Aidan suggests.  It sounds like your <code>CIVICRM_UF_BASEURL</code> is set correctly in <code>civicrm.settings.php</code> but it never hurts to check.</p>
  
  <p>A permanent solution for this is underway: See <a href="https://lab.civicrm.org/dev/core/issues/1497" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/issues/1497</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-19T22:06:32.500Z
Answers.Text: Jon, do you have a link to documentation (or issue queue) regarding "WordPress/CiviCRM can have trouble resolving tokens like [civicrm.files] if you have a symlink in your path."?
Answers.UserDisplayName: TwoMice
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-19T22:53:38.773Z
Answers.Text: Can I link to this answer? :)  This is something I learned from Kevin C., who researched it extensively. I can't say for sure if it's documented anywhere else, but you can talk to him about the bloody details
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-20T19:22:50.220Z
Answers.Text: Issue created, with reference to this SE question and to today's MM discussion with Kevin C. https://lab.civicrm.org/dev/core/issues/1497 (I suggest adding this to the answer for improved visibility).
Answers.UserDisplayName: TwoMice
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-31T16:22:49.273Z
Answers.LastActivityDate: 2019-12-20T22:50:29.863Z
Answers.LastEditDate: 2019-12-20T22:50:29.863Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>TLDR EDIT: 
    Civi getURL generated <code>&lt;site&gt;/civicrm/&lt;resourcepath&gt;?r=&lt;key&gt;</code> doesn't serve <code>&lt;site&gt;/&lt;resourcepath&gt;</code> Should the file be coming from civi with a key or not go through civi?</p>
  
  <p>I have a fairly new LAMP machine with CiviCRM 5.9.1 installed in Wordpress 5.0.3 with the plugin installer.
  I am getting a 404 when a contribution page is trying to pull in civicrm_stripe.js for the stripe payment processor.</p>
  
  <p>I can load the file at <code>&lt;site&gt;/wp-content/uploads/civicrm/ext/com.drastikbydesign.stripe/js/civicrm_stripe.js</code> (where I probably should get a 404) but get a 404 on <code>&lt;site&gt;/civicrm/wp-content/uploads/civicrm/ext/com.drastikbydesign.stripe/js/civicrm_stripe.js?r=&lt;key&gt;</code></p>
  
  <p>Is there any way to see why the resource isn't being served?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-31T16:19:12.723Z
Comments.Text: Note also that CiviCRM 5.9.0 has some rather nasty bugs, you'll definitely want 5.9.1!
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-31T21:23:59.740Z
Comments.Text: Good to know - I didn't see the latest release blog only does major releases.
Comments.UserDisplayName: Derek S.
Tags: <wordpress><extension><core>
Title: Civi 5.9 not serving extension javascript in WP 5
ThreadText: # Civi 5.9 not serving extension javascript in WP 5
  
  (Asked by: username_0 on 2019-01-30)
  
  TLDR EDIT:
  Civi getURL generated `/civicrm/?r=` doesn't serve `/` Should the file be coming from civi with a key or not go through civi?
  
  I have a fairly new LAMP machine with CiviCRM 5.9.1 installed in Wordpress 5.0.3 with the plugin installer.
  I am getting a 404 when a contribution page is trying to pull in civicrm\_stripe.js for the stripe payment processor.
  
  I can load the file at `/wp-content/uploads/civicrm/ext/com.drastikbydesign.stripe/js/civicrm_stripe.js` (where I probably should get a 404) but get a 404 on `/civicrm/wp-content/uploads/civicrm/ext/com.drastikbydesign.stripe/js/civicrm_stripe.js?r=`
  
  Is there any way to see why the resource isn't being served?
  
  **Tags:** wordpress, extension, core
  
  > **Comments:**
  > **username_1**: Note also that CiviCRM 5.9.0 has some rather nasty bugs, you'll definitely want 5.9.1!  
  > **username_0**: Good to know - I didn't see the latest release blog only does major releases.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2019-01-31. Score: 1 | Accepted answer
  
  Welcome to SE! Check your Extension Resource URL at `Administer > System Settings > Resource URL's`
  
  A typical WP install would show the Extension Resource URL as `[civicrm.files]/ext` where `[civicrm.files]` is `https://example.org/wp-content/uploads/civicrm`
  
  > **Comments:**
  > **username_0**: I believe it is correct - the extension php is loading, but the when civi is asked to serve the resource it doesn't.  I guess specifically, CRM_Core_Resources::singleton()->addScriptFile('com.drastikbydesign.stripe', 'js/civicrm_stripe.js') is not working.  
  > **username_0**: In the end I could get this to work by removing civi from the path and I'll hope that's right! :)  Thanks.  
  
  ---
  
  ### Answer by username_1 on 2019-01-31. Score: 2
  
  WordPress/CiviCRM can have trouble resolving tokens like `[civicrm.files]` if you have a symlink in your path.
  
  If you're having resource URL issues, I recommend replacing the tokens with absolute paths (with no symlinks) in **Administer » System Settings » Directories** as well as checking **Administer » System Settings » Resource URLs** as username_2 suggests. It sounds like your `CIVICRM_UF_BASEURL` is set correctly in `civicrm.settings.php` but it never hurts to check.
  
  A permanent solution for this is underway: See <https://lab.civicrm.org/dev/core/issues/1497>.
  
  > **Comments:**
  > **username_3**: Jon, do you have a link to documentation (or issue queue) regarding "WordPress/CiviCRM can have trouble resolving tokens like [civicrm.files] if you have a symlink in your path."?  
  > **username_1**: Can I link to this answer? :)  This is something I learned from Kevin C., who researched it extensively. I can't say for sure if it's documented anywhere else, but you can talk to him about the bloody details  
  > **username_3**: Issue created, with reference to this SE question and to today's MM discussion with Kevin C. https://lab.civicrm.org/dev/core/issues/1497 (I suggest adding this to the answer for improved visibility).  
  
  ---
  
  