Answers.Body: <p>At some point I recognized that it's not only the new mailing page that doesn't load when I disable debugging, but also the system status page wouldn't. So I thought, both things might have something in common. And it turned out, that they do, as they both angular pages (I don't really know what that means, but well that seems to connect them). With that knowledge I knew what I had to search for and I found another post that solved the problem: <a href="https://civicrm.stackexchange.com/a/19373/4484">https://civicrm.stackexchange.com/a/19373/4484</a> </p>
  
  <p>To put it in my own words: If you've got the same problem, you've got to make sure that the path for uploading pictures is the same as the one CiviCRM will look for pictures. The solution to my problem was to replace the former with the path of the latter (in my case: <code>[civicrm.files]/persist/contribute/</code>).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-06T21:02:59.100Z
Answers.Text: interesting - so it was your reference to this working when debugging was 'on' that threw me and probably others to pointing to the other ticket
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-04T19:10:36.463Z
Answers.LastActivityDate: 2017-09-04T19:10:36.463Z
Answers.UserDisplayName: Jannis Eicker
Answers.Body: <ol>
  <li><p>Cross-origin refers to accessing resources on a different domain. It's curious that URLs you reference are actually different domains -- <code>www.netzwerk-n.org</code> vs <code>netzwerk-n.org</code>. You might want to check which of those appear in (a) the URL bar (b) the <code>Resource URLs</code> (esp under "?" help button) and (c) the outputted HTML documents.</p></li>
  <li><p>As an alternative to "Debug" mode, you might try <s>toggling</s> disabling the "Asset Cache" mode. It's on the same screen: <code>Administer =&gt; System Settings =&gt; Debugging</code>, but it has fewer side-effects.</p></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-04T15:12:07.107Z
Answers.Text: Dear Tim, thanks for pointing to the differences in the URLs I'm using! Why didn't I see that earlier!? ;) But correcting it for the resource URLs didn't solve the problem. And in the Asset Cache mode, the mail tool doesn't load as well
Answers.UserDisplayName: Jannis Eicker
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-04T15:36:15.563Z
Answers.Text: @JannisEicker check your BASE_URL in `civicrm.setttings.php`.  Also check to make sure you're not rewriting the URL in your web server configuration?
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-04T16:03:04.297Z
Answers.Text: Dear @JonG, thanks for your comment! I've checked the BASEURL and it says http://netzwerk-n.org/crm which is correct. For other reasons (the icons for 'print' and so on wouldn't show), I had to add `global $civicrm_paths;
  $civicrm_paths['civicrm.files'] = array(
    'url' => 'http://netzwerk-n.org/crm/wp-content/uploads/civicrm/'
  );` into the settings.php as well. But that shouldn't interfere, I guess. In the UI, I wouldn't even know where to change the base URL and all the resource URLs as well as the directories are global now: I'm using [civicrm.root] and [civicrm.files].
Answers.UserDisplayName: Jannis Eicker
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-05T16:15:36.987Z
Answers.Text: (a) Completely agree it's best to fix issue in the path-settings.  (b) My suggestion to "toggle" asset-caching was a bit ambiguous -- should have said "disable". The reason debug mode works (despite path issues) is that it also (generally) disables asset caching.
Answers.UserDisplayName: Tim Otten
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-04T05:54:34.810Z
Answers.LastActivityDate: 2017-09-05T16:10:21.720Z
Answers.LastEditDate: 2017-09-05T16:10:21.720Z
Answers.UserDisplayName: Tim Otten
Body: <p>I've got the problem, that after an upgrade to the newest CiviCRM version (4.7.23) on WordPress, I can only create a new mass mailing when debug mode is enabled. When it is disabled, CiviCRM gives me an empty page after clicking on new mailing. It does not even say "Initializing...". However, the menu still works fine (doesn't freeze or so).</p>
  
  <p>I've checked the resource URL and the directories, they are correct (I would say). Although I had to leave the Custom PHP Directory field empty, because I simply don't know what to put in there.</p>
  
  <p>The JavaScript console gives me nine errors if I'm not in debug mode: </p>
  
  <ul>
  <li>Five times: Failed to load resource: the server responded with a status of 403 (Forbidden)</li>
  <li>One time: Uncaught Error: [$injector:modulerr]</li>
  <li>Three times: has been blocked by CORS policy: Access to Font at '<a href="http://www.netzwerk-n.org/crm/wp-content/plugins/civicrm/civicrm/bower_components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0" rel="nofollow noreferrer">http://www.netzwerk-n.org/crm/wp-content/plugins/civicrm/civicrm/bower_components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0</a>' from origin '<a href="http://netzwerk-n.org" rel="nofollow noreferrer">http://netzwerk-n.org</a>' has been blocked by CORS policy: No 'Access-Control Allow-Origin' header is present on the requested resource. Origin '<a href="http://netzwerk-n.org" rel="nofollow noreferrer">http://netzwerk-n.org</a>' is therefore not allowed access.</li>
  </ul>
  
  <p>What might be pointing to the problem here is, that CiviCRM is located at 'netzwerk-n.org/crm' not 'netzwerk-n.org'. But as I said, the directories in the setting.php and also in CiviCRM itself look correct to me (they refer to 'netzwerk-n.org/crm').</p>
  
  <p>I've also checked my permissions, but I'm an admin so there shouldn't be problems, I guess.</p>
  
  <p>When I enable debugging, I can write new mails. However, in debug mode, CiviCRM doesn't seem to actually send/deliver mails. So it's of no use to me.</p>
  
  <p>I'd love to here some of your ideas on that topic.</p>
  
  <p>Best regards
  Jannis</p>
  
  <p>[Edit: Just recognized, that also the system status page does not load when debugging is disabled.]</p>
  
Tags: <civimail><upgrade><mailing><debugging><angular>
Title: CiviMail: Can only write new mailing in debug mode (SOLVED)
ThreadText: # CiviMail: Can only write new mailing in debug mode (SOLVED)
  
  (Asked by: username_0 on 2017-09-03)
  
  I've got the problem, that after an upgrade to the newest CiviCRM version (4.7.23) on WordPress, I can only create a new mass mailing when debug mode is enabled. When it is disabled, CiviCRM gives me an empty page after clicking on new mailing. It does not even say "Initializing...". However, the menu still works fine (doesn't freeze or so).
  
  I've checked the resource URL and the directories, they are correct (I would say). Although I had to leave the Custom PHP Directory field empty, because I simply don't know what to put in there.
  
  The JavaScript console gives me nine errors if I'm not in debug mode:
  
  * Five times: Failed to load resource: the server responded with a status of 403 (Forbidden)
  * One time: Uncaught Error: [$injector:modulerr]
  * Three times: has been blocked by CORS policy: Access to Font at '<http://www.netzwerk-n.org/crm/wp-content/plugins/civicrm/civicrm/bower_components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0>' from origin '<http://netzwerk-n.org>' has been blocked by CORS policy: No 'Access-Control Allow-Origin' header is present on the requested resource. Origin '<http://netzwerk-n.org>' is therefore not allowed access.
  
  What might be pointing to the problem here is, that CiviCRM is located at 'netzwerk-n.org/crm' not 'netzwerk-n.org'. But as I said, the directories in the setting.php and also in CiviCRM itself look correct to me (they refer to 'netzwerk-n.org/crm').
  
  I've also checked my permissions, but I'm an admin so there shouldn't be problems, I guess.
  
  When I enable debugging, I can write new mails. However, in debug mode, CiviCRM doesn't seem to actually send/deliver mails. So it's of no use to me.
  
  I'd love to here some of your ideas on that topic.
  
  Best regards
  Jannis
  
  [Edit: Just recognized, that also the system status page does not load when debugging is disabled.]
  
  **Tags:** civimail, upgrade, mailing, debugging, angular
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2017-09-04. Score: 1 | Accepted answer
  
  At some point I recognized that it's not only the new mailing page that doesn't load when I disable debugging, but also the system status page wouldn't. So I thought, both things might have something in common. And it turned out, that they do, as they both angular pages (I don't really know what that means, but well that seems to connect them). With that knowledge I knew what I had to search for and I found another post that solved the problem: <https://civicrm.stackexchange.com/a/19373/4484>
  
  To put it in my own words: If you've got the same problem, you've got to make sure that the path for uploading pictures is the same as the one CiviCRM will look for pictures. The solution to my problem was to replace the former with the path of the latter (in my case: `[civicrm.files]/persist/contribute/`).
  
  > **Comments:**
  > **username_1**: interesting - so it was your reference to this working when debugging was 'on' that threw me and probably others to pointing to the other ticket  
  
  ---
  
  ### Answer by username_2 on 2017-09-04. Score: 3
  
  1. Cross-origin refers to accessing resources on a different domain. It's curious that URLs you reference are actually different domains -- `www.netzwerk-n.org` vs `netzwerk-n.org`. You might want to check which of those appear in (a) the URL bar (b) the `Resource URLs` (esp under "?" help button) and (c) the outputted HTML documents.
  2. As an alternative to "Debug" mode, you might try ~~toggling~~ disabling the "Asset Cache" mode. It's on the same screen: `Administer => System Settings => Debugging`, but it has fewer side-effects.
  
  > **Comments:**
  > **username_0**: Dear Tim, thanks for pointing to the differences in the URLs I'm using! Why didn't I see that earlier!? ;) But correcting it for the resource URLs didn't solve the problem. And in the Asset Cache mode, the mail tool doesn't load as well  
  > **username_3**: @JannisEicker check your BASE_URL in `civicrm.setttings.php`.  Also check to make sure you're not rewriting the URL in your web server configuration?  
  > **username_0**: Dear @JonG, thanks for your comment! I've checked the BASEURL and it says http://netzwerk-n.org/crm which is correct. For other reasons (the icons for 'print' and so on wouldn't show), I had to add `global $civicrm_paths; $civicrm_paths['civicrm.files'] = array(   'url' => 'http://netzwerk-n.org/crm/wp-content/uploads/civicrm/' );` into the settings.php as well. But that shouldn't interfere, I guess. In the UI, I wouldn't even know where to change the base URL and all the resource URLs as well as the directories are global now: I'm using [civicrm.root] and [civicrm.files].  
  > **username_2**: (a) Completely agree it's best to fix issue in the path-settings.  (b) My suggestion to "toggle" asset-caching was a bit ambiguous -- should have said "disable". The reason debug mode works (despite path issues) is that it also (generally) disables asset caching.  
  
  ---
  
  