Answers.Body: <p>Not exactly, but I've seen WYSIWYG having problems on one of our sites due to incorrect loading of <code>[cms.root]</code> token in Resource URL. To check what's wrong.</p>
  
  <ul>
  <li>Look for the token populated by clicking on the small help icon on <code>civicrm/admin/setting/url?reset=1</code> (Administer -> System Setting -> Resource URL).</li>
  <li>Similarly on <code>civicrm/admin/setting/path?reset=1</code> (Administer -> System Setting -> Directories).</li>
  <li><p>If any of the path looks incorrect, specify it explicitly in your <code>civicrm.settings.php</code> file as below.</p>
  
  <pre><code>global $civicrm_paths;
  $civicrm_paths['cms.root'] = array(
    'url' =&gt; 'http://cms_root_url',
    'path' =&gt; '/cms/root/path',
  );
  $civicrm_paths['civicrm.root'] = array(
    'url' =&gt; 'http://civicrm_root_url',
    'path' =&gt; '/civicrm/root/path',
  );
  $civicrm_paths['civicrm.files'] = array(
    'url' =&gt; 'http://civicrm_files_url',
    'path' =&gt; '/civicrm/files/path',
  );
  </code></pre></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-22T09:55:59.947Z
Answers.Text: Thank you for your reply. I think you got me on the right track. Please see the update I added at the top of the the post.  I hope you can tell me where to fix that, I am not seeing that path with the subdirectory in civicrm.settings.php
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-22T10:19:27.903Z
Answers.Text: Not sure where this originates from (base page?). But you can directly copy the above code part and paste it in `civicrm.settings.php` with your url and path to see if it fixes your issue. It will not be already present in that file. you need to add it.
Answers.UserDisplayName: jitendra - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-22T10:20:22.223Z
Answers.Text: The above example only contains the setting for cms.root, but from the screenshot, it seems you need to do it for `civicrm.root` and `civicrm.files`
Answers.UserDisplayName: jitendra - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-22T17:29:44.367Z
Answers.Text: Thank you. That worked perfectly for the civicrm.root.  Before I do the same for the civicrm.files, can you tell me what that code should look like?
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-23T05:40:14.810Z
Answers.Text: Just need to replace cms.root with civicrm.root and civicrm.file. Have updated the answer to the same.
Answers.UserDisplayName: jitendra - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-22T07:36:17.047Z
Answers.LastActivityDate: 2018-01-23T05:39:28.093Z
Answers.LastEditDate: 2018-01-23T05:39:28.093Z
Answers.UserDisplayName: jitendra - fuzion
Answers.Body: <p>Based on the screenshots it looks like you've installed WP in it's own directory as opposed to the web root. </p>
  
  <p>Starting in Version 4.7.27 CiviCRM will detect if <a href="https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory" rel="nofollow noreferrer">WP is installed in it's own directory</a> </p>
  
  <p>So on new installs we will see a new section in civicrm.settings.php:</p>
  
  <pre><code>// Additional settings generated by installer:
  $civicrm_paths['wp.frontend.base']['url'] = 'https://wpsub.test/';
  $civicrm_paths['wp.backend.base']['url'] = 'https://wpsub.test/wordpress/wp-admin/';
  $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'https://wpsub.test/wordpress/wp-content/plugins/civicrm/civicrm/';
  </code></pre>
  
  <p>Does you civicrm.settings.php have the above lines?   If this was an upgrade it would not.   The reason for these settings is that the baseurl is different for the front end and back end of a WP site if it's installed in it's own directory.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-22T17:42:04.633Z
Answers.Text: Yes it does. It was not any upgrade.  I installed the latest version on a subdomain, then imported our records from the root install.  We wanted to start over fresh.  The lines on my Additional Settings looks like that.  There is no mention of a /secure/ directory. I don't know how that got in there.
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-22T19:33:47.317Z
Answers.Text: Do the lines have /secure/ in $civicrm_paths['wp.backend.base']['url']  ?   There is a difference between a subdomain install - https://subdomain.example.org and if WP is in it's own directory.  Can you past your copy of the settings file that matches the one I have above?   WP in it's own directory is a special configuration.  Some hosts do it by default, other times it is set up by the organization.  Do you know who your host is?
Answers.UserDisplayName: Kevin Cristiano
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-22T20:36:49.103Z
Answers.Text: No the lines do not have /secure/. Yes I know who my host is.  I pasted those lines on the top of my post. Does anything look out to place? WP is installed on secure.blank.org not secure.blank.org/secure/. I thought I made all the necessary configurations for the subdomain install, but if you think I missed something, let me know.
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-22T14:17:01.070Z
Answers.LastActivityDate: 2018-01-22T14:17:01.070Z
Answers.UserDisplayName: Kevin Cristiano
Body: <p>*****UPDATE ADDED 1/22/18-Additonal Settings from Civicrm.settings.php</p>
  
  <pre><code>// Additional settings generated by installer:
  </code></pre>
  
  <p>$civicrm_paths['wp.frontend.base']['url'] = '<a href="https://secure.blank.org/" rel="nofollow noreferrer">https://secure.blank.org/</a>';
  $civicrm_paths['wp.backend.base']['url'] = '<a href="https://secure.blank.org/wp-admin/" rel="nofollow noreferrer">https://secure.blank.org/wp-admin/</a>';
  $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = '<a href="https://secure.blank.org/wp-content/plugins/civicrm/civicrm" rel="nofollow noreferrer">https://secure.blank.org/wp-content/plugins/civicrm/civicrm</a>';</p>
  
  <p>*****UPDATE ADDED 1/22/18-<br>
  Please see the screenshot below.  Could this be the problem? There is not a /secure/ subdirectory. 
  The paths should be: 
  https://secure.blank.org/wp-content/plugins/civicrm/civicrm/<br>
  not 
  https://secure.blank.org/<strong>secure</strong>/wp-content/plugins/civicrm/civicrm/ 
  and 
  https://secure.blank.org/wp-content/uploads/civicrm/ 
  not 
  https://secure.blank.org/<strong>secure</strong>/wp-content/uploads/civicrm/</p>
  
  <p>I am not seeing where to change this in civicrm.settings.php. Is there another file where this is set?</p>
  
  <p><a href="https://i.sstatic.net/Dwafn.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Dwafn.jpg" alt="enter image description here"></a></p>
  
  <p>****END UPDATE****</p>
  
  <p>We are using Civi 4.7.29 on WordPress 4.9.1</p>
  
  <p>When creating a new mailing in CiviMail, I will select the template and it will be displayed differently in the HTML editor than it should be.  The preview show it correctly. Please see the screen shots below.  I am thinking it is either a paths issue or a permissions issue.  Has this happened to anyone else?  Does anyone have any idea where I can start with resolving it?</p>
  
  <p><a href="https://i.sstatic.net/KFB29.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/KFB29.jpg" alt="HTML EDITOR"></a>
  <a href="https://i.sstatic.net/8UAFg.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/8UAFg.jpg" alt="Preview"></a></p>
  
  <p>These are the ERRORs being shown 
  Failed to load resource: the server responded with a status of 404 (Not Found)
  /wp-content/plugins/civicrm/civicrm/extern/open.php?q= 
  /secure/wp-content/uploads/civicrm/persist/crm-ckeditor-default.js?t=G87D Failed to load resource: the server responded with a status of 404 (Not Found)</p>
  
  <p>What should the permissions be for these two files?
  My open.php is 664
  My crm-ckeditor-default.js is 644.</p>
  
Tags: <wordpress><civimail><ckeditor><wysiwyg>
Title: CiviMail WYSIWYG not working
ThreadText: # CiviMail WYSIWYG not working
  
  (Asked by: username_0 on 2018-01-22)
  
  *****UPDATE ADDED 1/22/18-Additonal Settings from Civicrm.settings.php
  // Additional settings generated by installer:
  
  $civicrm_paths['wp.frontend.base']['url'] = 'https://secure.blank.org/';
  $civicrm_paths['wp.backend.base']['url'] = 'https://secure.blank.org/wp-admin/';
  $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'https://secure.blank.org/wp-content/plugins/civicrm/civicrm';
  *****UPDATE ADDED 1/22/18-
  Please see the screenshot below.  Could this be the problem? There is not a /secure/ subdirectory. 
  The paths should be: 
  https://secure.blank.org/wp-content/plugins/civicrm/civicrm/
  not 
  https://secure.blank.org/secure/wp-content/plugins/civicrm/civicrm/ 
  and 
  https://secure.blank.org/wp-content/uploads/civicrm/ 
  not 
  https://secure.blank.org/secure/wp-content/uploads/civicrm/
  I am not seeing where to change this in civicrm.settings.php. Is there another file where this is set?
  
  ****END UPDATE****
  We are using Civi 4.7.29 on WordPress 4.9.1
  When creating a new mailing in CiviMail, I will select the template and it will be displayed differently in the HTML editor than it should be.  The preview show it correctly. Please see the screen shots below.  I am thinking it is either a paths issue or a permissions issue.  Has this happened to anyone else?  Does anyone have any idea where I can start with resolving it?
  
  
  These are the ERRORs being shown 
  Failed to load resource: the server responded with a status of 404 (Not Found)
  /wp-content/plugins/civicrm/civicrm/extern/open.php?q= 
  /secure/wp-content/uploads/civicrm/persist/crm-ckeditor-default.js?t=G87D Failed to load resource: the server responded with a status of 404 (Not Found)
  What should the permissions be for these two files?
  My open.php is 664
  My crm-ckeditor-default.js is 644.
  
  **Tags:** wordpress, civimail, ckeditor, wysiwyg
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-01-22. Score: 2 | Accepted answer
  
  Not exactly, but I've seen WYSIWYG having problems on one of our sites due to incorrect loading of [cms.root] token in Resource URL. To check what's wrong.
  
  Look for the token populated by clicking on the small help icon on civicrm/admin/setting/url?reset=1 (Administer -> System Setting -> Resource URL).
  Similarly on civicrm/admin/setting/path?reset=1 (Administer -> System Setting -> Directories).
  If any of the path looks incorrect, specify it explicitly in your civicrm.settings.php file as below.
  global $civicrm_paths;
  $civicrm_paths['cms.root'] = array(
    'url' => 'http://cms_root_url',
    'path' => '/cms/root/path',
  );
  $civicrm_paths['civicrm.root'] = array(
    'url' => 'http://civicrm_root_url',
    'path' => '/civicrm/root/path',
  );
  $civicrm_paths['civicrm.files'] = array(
    'url' => 'http://civicrm_files_url',
    'path' => '/civicrm/files/path',
  );
  
  > **Comments:**
  > **username_0**: Thank you for your reply. I think you got me on the right track. Please see the update I added at the top of the the post.  I hope you can tell me where to fix that, I am not seeing that path with the subdirectory in civicrm.settings.php  
  > **username_1**: Not sure where this originates from (base page?). But you can directly copy the above code part and paste it in `civicrm.settings.php` with your url and path to see if it fixes your issue. It will not be already present in that file. you need to add it.  
  > **username_1**: The above example only contains the setting for cms.root, but from the screenshot, it seems you need to do it for `civicrm.root` and `civicrm.files`  
  > **username_0**: Thank you. That worked perfectly for the civicrm.root.  Before I do the same for the civicrm.files, can you tell me what that code should look like?  
  > **username_1**: Just need to replace cms.root with civicrm.root and civicrm.file. Have updated the answer to the same.  
  
  ---
  
  ### Answer by username_2 on 2018-01-22. Score: 3
  
  Based on the screenshots it looks like you've installed WP in it's own directory as opposed to the web root. 
  Starting in Version 4.7.27 CiviCRM will detect if WP is installed in it's own directory 
  So on new installs we will see a new section in civicrm.settings.php:
  // Additional settings generated by installer:
  $civicrm_paths['wp.frontend.base']['url'] = 'https://wpsub.test/';
  $civicrm_paths['wp.backend.base']['url'] = 'https://wpsub.test/wordpress/wp-admin/';
  $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'https://wpsub.test/wordpress/wp-content/plugins/civicrm/civicrm/';
  
  Does you civicrm.settings.php have the above lines?   If this was an upgrade it would not.   The reason for these settings is that the baseurl is different for the front end and back end of a WP site if it's installed in it's own directory.
  
  > **Comments:**
  > **username_0**: Yes it does. It was not any upgrade.  I installed the latest version on a subdomain, then imported our records from the root install.  We wanted to start over fresh.  The lines on my Additional Settings looks like that.  There is no mention of a /secure/ directory. I don't know how that got in there.  
  > **username_2**: Do the lines have /secure/ in $civicrm_paths['wp.backend.base']['url']  ?   There is a difference between a subdomain install - https://subdomain.example.org and if WP is in it's own directory.  Can you past your copy of the settings file that matches the one I have above?   WP in it's own directory is a special configuration.  Some hosts do it by default, other times it is set up by the organization.  Do you know who your host is?  
  > **username_0**: No the lines do not have /secure/. Yes I know who my host is.  I pasted those lines on the top of my post. Does anything look out to place? WP is installed on secure.blank.org not secure.blank.org/secure/. I thought I made all the necessary configurations for the subdomain install, but if you think I missed something, let me know.  
  
  ---
  
  