Answers.Body: <p>Well, finally managed to get CKEditor going, but this is far from an ideal solutuion. The problem is that an extra component is being put into the URL for the editor. My main site that works is mysite.org and the problem is with test.mysite.org. This has all its files in a subdirectory of the main site and this confuses things. Looking up [civicrm.root] in the Resource URL admin page shows an extra "/test". So work round for now is to edit CRM/Core/Resource.php to replace "[civicrm.root]" with "wp-content/plugins/civicrm/civicrm/" in the call to the editor. A bit of trail and error and a bit odd as that isn't logical from what I epxected [civicrm.root] to produce.</p>
  
  <p>I would love a better solution.</p>
  
  <p>Another problem <a href="https://civicrm.stackexchange.com/questions/19881/how-can-i-fix-civicrm-root-variable-on-an-addon-domain">How can I fix [civicrm.root] variable on an addon domain?</a> was useful in confirming that [civicrm.root] is the problem.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-10T13:21:42.023Z
Answers.Text: Do you have a CiviCRM base page set? This might be in civicrm.settings.php, or in the settings.
Answers.UserDisplayName: Andrew West
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-12T08:55:59.330Z
Answers.Text: Not sure what you mean by CiviCRM base page...
Answers.UserDisplayName: Mick Kahn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-15T11:47:09.780Z
Answers.Text: See Alan Dixon's comment here on setting the base URL: https://civicrm.stackexchange.com/questions/16114/change-url-only-on-wordpresscivicrm
Answers.UserDisplayName: Andrew West
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-28T11:41:38.453Z
Answers.Text: I'm running CiviCRM on aWordpress install using Cloudron (https://cloudron.io) and getting a similar issue. Can't get CKEditor to load. Attempts to edit CIVCRM_CMSDIR aren't working. The console is trying to load CKEditor.js from https://domain.org/app/data/wp-content/plugins/civicrm/civicrm/js/wysiwyg/ - i.e. it's inserting app/data/ from the path into the URL, incorrectly.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-28T21:04:57.827Z
Answers.Text: I didn't edit CIVICRM_CMSDIR but edited ...wp-content/plugins/civicrm/civicrm/CRM/Core/Resource.php as described above. In my case it was because I was using  a subdomain test. With domain.org, everything is a directory public_html and for test.domain.org, everything is in public_html/test .  This caused the problem, but I had to do a bit of trial and error to workout what part of the path to put in. Might be different in your hosting environment. Look at what it says for [civicrm.root] in the help button in the Administer >> System Settings >> Directories, which is how I got there.
Answers.UserDisplayName: Mick Kahn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-10T18:18:21.500Z
Answers.LastActivityDate: 2017-11-10T18:18:21.500Z
Answers.UserDisplayName: Mick Kahn
Body: <p>I have CiviCRM 4.7.22 and WordPress 4.8.2. I don't get the WYSIWYG CKEditor for a New Mailing or the description in a new event. Both are present on the CiviCRM sandbox site.</p>
  
  <p>From the documentation I think that it should be installed with WordPress and set as default. Permissions can't be an issue as I am an admin.</p>
  
  <p>While <a href="https://civicrm.stackexchange.com/questions/17037/wysiwyg-editor-disappeared-in-civicrm-4-7-16">WYSIWYG editor disappeared in CiviCRM 4.7.16</a> looks similar, the answers seem to relate to Drupal not WordPress and nothing suggested there helps.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-15T23:22:30.360Z
Comments.Text: The question you referenced is a WordPress install; the answers are CMS-agnostic.  Can you verify that the problem exists with a default theme (e.g. twothousandseventeen)?
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-16T00:15:00.900Z
Comments.Text: Use F12 to open the browser console and refresh the page. If there are any error messages, take a screenshot and paste them here.
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-16T08:37:22.993Z
Comments.Text: @JonG-MegaphoneTech I am using thethousandseventeen. On the link referred to some was definitely Drupal specific (permissions in CMS). I can't see any similar setting in WP. I did try the cache rebuild and open and save but not change ACL.
Comments.UserDisplayName: Mick Kahn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-16T08:38:39.130Z
Comments.Text: @Coleman I don't understand what you mean by using F12. Doesn't do anything in Firefox or IE. I don't see any error message.
Comments.UserDisplayName: Mick Kahn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-16T08:57:57.977Z
Comments.Text: @coleman I found the browser console. F12 not functioning in IE and have to use menu in Firefox. I do have an error: **Loading failed for the <script> with source “http://<sitename>/test/wp-content/plugins/civicrm/civicrm/js/wysiwyg/crm.ckeditor.js”**
Comments.UserDisplayName: Mick Kahn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-16T17:27:23.777Z
Comments.Text: Bingo, you found the problem. If that script doesn't load, then you don't get wysiwyg. Check your resource url setting in CiviCRM. (in the menu that's Administer -> System Settings -> Resource URLs)
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-17T00:13:26.317Z
Comments.Text: @coleman thanks that has been useful and I'm getting close. I realise now that the production server is fine and the problem is related to one that the problem is with my test server where http://test.site.org gets mapped to a subdirectory of the production site. I had to fiddle with the Resource URL to get anything working. I see now that there are some related questions, but its too late at night now to unpick them all as they seem different and also I don't want to undo the fix for other issues! So perhaps nearly there!
Comments.UserDisplayName: Mick Kahn
Tags: <wordpress><ckeditor><wysiwyg>
Title: WYSIWYG editor not present with WordPress
ThreadText: # WYSIWYG editor not present with WordPress
  
  (Asked by: username_0 on 2017-10-15)
  
  I have CiviCRM 4.7.22 and WordPress 4.8.2. I don't get the WYSIWYG CKEditor for a New Mailing or the description in a new event. Both are present on the CiviCRM sandbox site.
  
  From the documentation I think that it should be installed with WordPress and set as default. Permissions can't be an issue as I am an admin.
  
  While [WYSIWYG editor disappeared in CiviCRM 4.7.16](https://civicrm.stackexchange.com/questions/17037/wysiwyg-editor-disappeared-in-civicrm-4-7-16) looks similar, the answers seem to relate to Drupal not WordPress and nothing suggested there helps.
  
  **Tags:** wordpress, ckeditor, wysiwyg
  
  > **Comments:**
  > **username_1**: The question you referenced is a WordPress install; the answers are CMS-agnostic.  Can you verify that the problem exists with a default theme (e.g. twothousandseventeen)?  
  > **username_2**: Use F12 to open the browser console and refresh the page. If there are any error messages, take a screenshot and paste them here.  
  > **username_0**: @username_1 I am using thethousandseventeen. On the link referred to some was definitely Drupal specific (permissions in CMS). I can't see any similar setting in WP. I did try the cache rebuild and open and save but not change ACL.  
  > **username_0**: @username_2 I don't understand what you mean by using F12. Doesn't do anything in Firefox or IE. I don't see any error message.  
  > **username_0**: @username_2 I found the browser console. F12 not functioning in IE and have to use menu in Firefox. I do have an error: **Loading failed for the <script> with source “http://<sitename>/test/wp-content/plugins/civicrm/civicrm/js/wysiwyg/crm.ckeditor.js”**  
  > **username_2**: Bingo, you found the problem. If that script doesn't load, then you don't get wysiwyg. Check your resource url setting in CiviCRM. (in the menu that's Administer -> System Settings -> Resource URLs)  
  > **username_0**: @username_2 thanks that has been useful and I'm getting close. I realise now that the production server is fine and the problem is related to one that the problem is with my test server where http://test.site.org gets mapped to a subdirectory of the production site. I had to fiddle with the Resource URL to get anything working. I see now that there are some related questions, but its too late at night now to unpick them all as they seem different and also I don't want to undo the fix for other issues! So perhaps nearly there!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-11-10. Score: 1 | Accepted answer
  
  Well, finally managed to get CKEditor going, but this is far from an ideal solutuion. The problem is that an extra component is being put into the URL for the editor. My main site that works is mysite.org and the problem is with test.mysite.org. This has all its files in a subdirectory of the main site and this confuses things. Looking up [civicrm.root] in the Resource URL admin page shows an extra "/test". So work round for now is to edit CRM/Core/Resource.php to replace "[civicrm.root]" with "wp-content/plugins/civicrm/civicrm/" in the call to the editor. A bit of trail and error and a bit odd as that isn't logical from what I epxected [civicrm.root] to produce.
  
  I would love a better solution.
  
  Another problem [How can I fix [civicrm.root] variable on an addon domain?](https://civicrm.stackexchange.com/questions/19881/how-can-i-fix-civicrm-root-variable-on-an-addon-domain) was useful in confirming that [civicrm.root] is the problem.
  
  > **Comments:**
  > **username_3**: Do you have a CiviCRM base page set? This might be in civicrm.settings.php, or in the settings.  
  > **username_0**: Not sure what you mean by CiviCRM base page...  
  > **username_3**: See Alan Dixon's comment here on setting the base URL: https://civicrm.stackexchange.com/questions/16114/change-url-only-on-wordpresscivicrm  
  > **username_4**: I'm running CiviCRM on aWordpress install using Cloudron (https://cloudron.io) and getting a similar issue. Can't get CKEditor to load. Attempts to edit CIVCRM_CMSDIR aren't working. The console is trying to load CKEditor.js from https://domain.org/app/data/wp-content/plugins/civicrm/civicrm/js/wysiwyg/ - i.e. it's inserting app/data/ from the path into the URL, incorrectly.  
  > **username_0**: I didn't edit CIVICRM_CMSDIR but edited ...wp-content/plugins/civicrm/civicrm/CRM/Core/Resource.php as described above. In my case it was because I was using  a subdomain test. With domain.org, everything is a directory public_html and for test.domain.org, everything is in public_html/test .  This caused the problem, but I had to do a bit of trial and error to workout what part of the path to put in. Might be different in your hosting environment. Look at what it says for [civicrm.root] in the help button in the Administer >> System Settings >> Directories, which is how I got there.  
  
  ---
  
  