Answers.Body: <p>You can write the below code in <code>civicrm.settings.php</code> file to override the current value of <code>[civicrm.root]</code> token.</p>
  
  <pre><code>global $civicrm_paths;
  $civicrm_paths['civicrm.root'] = array(
    'url' =&gt; 'https://website_url.com/.../civicrm',
    'path' =&gt; '/path/to/civicrm/folder/',
  );
  </code></pre>
  
  <p>Similarly, it can be used to set <code>[civicrm.files]</code> and <code>[cms.root]</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-28T08:57:35.550Z
Answers.LastActivityDate: 2018-07-28T08:57:35.550Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>Inside /sites/all/modules/civicrm/CRM/Core/Resources.php
  Line 738 and for civicrm version 5.3.1</p>
  
  <pre><code> $editor = Civi::settings()-&gt;get('editor_id');
      if ($editor == "CKEditor") {
        CRM_Admin_Page_CKEditorConfig::setConfigDefault();
        $items[] = array(
          'config' =&gt; array(
            'wysisygScriptLocation' =&gt; Civi::paths()-&gt;getUrl("[civicrm.root]/js/wysiwyg/crm.ckeditor.js"),
            'CKEditorCustomConfig' =&gt; CRM_Admin_Page_CKEditorConfig::getConfigUrl(),
          ),
        );
      }
  </code></pre>
  
  <p>I get error event configuration page which is as follows:
  Failed to load resource: net::ERR_NAME_NOT_RESOLVED and url which is not loaded is as shown below
  <a href="https://newspace/prestige/public_html/sites/all/modules/civicrm/js/wysiwyg/crm.ckeditor.js" rel="nofollow noreferrer">https://newspace/prestige/public_html/sites/all/modules/civicrm/js/wysiwyg/crm.ckeditor.js</a>
  So link is incorrect which seems to be due to incorrect [civicrm.root], </p>
  
  <p>Can I set $civicrm_root in civicrm.settings.php and can that help fix it?
  When I place directly the url it works but it is in the code below which is Core part of civicrm</p>
  
Tags: <drupal><ckeditor>
Title: crm.ckeditor.js not found
ThreadText: # crm.ckeditor.js not found
  
  (Asked by: username_0 on 2018-07-28)
  
  Inside /sites/all/modules/civicrm/CRM/Core/Resources.php
  Line 738 and for civicrm version 5.3.1
  
  ```
   $editor = Civi::settings()->get('editor_id');
      if ($editor == "CKEditor") {
        CRM_Admin_Page_CKEditorConfig::setConfigDefault();
        $items[] = array(
          'config' => array(
            'wysisygScriptLocation' => Civi::paths()->getUrl("[civicrm.root]/js/wysiwyg/crm.ckeditor.js"),
            'CKEditorCustomConfig' => CRM_Admin_Page_CKEditorConfig::getConfigUrl(),
          ),
        );
      }
  
  ```
  
  I get error event configuration page which is as follows:
  Failed to load resource: net::ERR\_NAME\_NOT\_RESOLVED and url which is not loaded is as shown below
  <https://newspace/prestige/public_html/sites/all/modules/civicrm/js/wysiwyg/crm.ckeditor.js>
  So link is incorrect which seems to be due to incorrect [civicrm.root],
  
  Can I set $civicrm\_root in civicrm.settings.php and can that help fix it?
  When I place directly the url it works but it is in the code below which is Core part of civicrm
  
  **Tags:** drupal, ckeditor
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-07-28. Score: 3
  
  You can write the below code in `civicrm.settings.php` file to override the current value of `[civicrm.root]` token.
  
  ```
  global $civicrm_paths;
  $civicrm_paths['civicrm.root'] = array(
    'url' => 'https://website_url.com/.../civicrm',
    'path' => '/path/to/civicrm/folder/',
  );
  
  ```
  
  Similarly, it can be used to set `[civicrm.files]` and `[cms.root]`.
  
  
  ---
  
  