2

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 looks similar, the answers seem to relate to Drupal not WordPress and nothing suggested there helps.

7
  • 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)? Oct 15, 2017 at 23:22
  • Use F12 to open the browser console and refresh the page. If there are any error messages, take a screenshot and paste them here.
    – Coleman
    Oct 16, 2017 at 0:15
  • @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.
    – Mick Kahn
    Oct 16, 2017 at 8:37
  • @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.
    – Mick Kahn
    Oct 16, 2017 at 8:38
  • @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”
    – Mick Kahn
    Oct 16, 2017 at 8:57

1 Answer 1

1

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? was useful in confirming that [civicrm.root] is the problem.

5
  • Do you have a CiviCRM base page set? This might be in civicrm.settings.php, or in the settings. Jan 10, 2018 at 13:21
  • Not sure what you mean by CiviCRM base page...
    – Mick Kahn
    Jan 12, 2018 at 8:55
  • See Alan Dixon's comment here on setting the base URL: civicrm.stackexchange.com/questions/16114/… Jan 15, 2018 at 11:47
  • I'm running CiviCRM on aWordpress install using Cloudron (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 domain.org/app/data/wp-content/plugins/civicrm/civicrm/js/… - i.e. it's inserting app/data/ from the path into the URL, incorrectly.
    – Graham
    Apr 28, 2019 at 11:41
  • 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.
    – Mick Kahn
    Apr 28, 2019 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.