3

At some point ckeditor broke for us. Developer tools show me it is not loading because :

Common.js?ol145e:249 GET https://home/NAMEREMOVED/www/www/sites/all/modules/civicrm/js/wysiwyg/crm.ckeditor.js net::ERR_NAME_NOT_RESOLVED

I can't seem to find the appropriate place to fix this. As I usually don't poke around the guts.

Everything else seems to be loading appropriately from the domain instead, i.e. https://domain.name/sites/all/modules/etc.....

Any thoughts? We haven't migrated the server just updated it.

CiviCRM version 4.7.16 is up-to-date. We are on Drupal 7.54? I have shell access and can edit files.

  • Do other components of your site live inside www/www? I've never seen that before. It would be worth checking. – Christia Feb 8 '17 at 0:49
  • It sounds like CiviCRM is miscalculating the path to your crm.ckeditor.js. You might be able to trace this down - could be a symlink or misconfig in CiviCRM (check the BASEURL setting in civicrm.settings.php, and resource URL in admin UI). If all else fails, you can catch that incorrect URL and redirect to the correct one from your webserver or using Drupal's Redirect module. – Chris Burgess Feb 8 '17 at 1:28
  • I've got the same problem - my Resource URL directory was wrong but I just fixed it, but even after removing templates_c and drush cc all the ckeditor.js file has the wrong URL...will report if I get an update. 4.7.15 here. – Jon G - Megaphone Tech Feb 12 '17 at 6:16
6

I just found and fixed the same problem. There are two possible fixes to this problem, only one of which is available to you immediately. As per usual, Chris nails it.

In your civicrm.settings.php file, there's a line $civicrm_root = /path/to/civicrm. If you have a symlink in that path, then the [civicrm.root] is miscalculated. So the easy fix is to fix your $civicrm_root to the non-symlink path to the file.

The longer-term fix is this line: CRM/Core/Resources.php: 'wysisygScriptLocation' => Civi::paths()->getUrl("[civicrm.root]/js/wysiwyg/crm.ckeditor.js"),

This shouldn't call civicrm.root, it should use the resource URL. I'll try and post a bug report (and maybe even a fix!) if I find a moment - but first, like you, I need to get my mailing out :)

  • I've come across this today and it took me a very long time to find this post. Thanks Jon G – Jon-man Jul 20 '18 at 13:44
  • Hey Jon G did you ever get a chance to investigate this one and find out why Civi is miscalculating the [civicrm.root] token? – Coleman Jul 20 '18 at 14:01
  • @coleman I didn't. I feel like there's this whole area of symlinks in Civi config that require some in-depth knowledge. The Civi/WordPress experts have that knowledge, but I don't! – Jon G - Megaphone Tech Jul 20 '18 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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