Answers.Body: <p>This is because your cms.root doesn't match properly with civicrm.root variable and you might be using variables in Resource url for 'CiviCRM Resource URL'. </p>
  
  <p>For such cases you add below two line at the end of the file you will need to change </p>
  
  <p><code>$civicrm_root = '/app/data/wp-content/plugins/civicrm/civicrm/';</code> to <code>$civicrm_root = '/app/code/wp-content/plugins/civicrm/civicrm/';</code></p>
  
  <pre><code>$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = CIVICRM_UF_BASEURL . 'wp-content/plugins/civicrm/civicrm';civicrm/';                                                                                                     
  $civicrm_paths['civicrm.root']['url'] = CIVICRM_UF_BASEURL . 'wp-content/plugins/civicrm/civicrm';civicrm/';
  </code></pre>
  
  <p>Thanks</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T16:14:03.080Z
Answers.Text: thanks Pradeep. My Resource URL is currently set in my settings file as https://mydomain.org/wp-content/plugins/civicrm/civicrm
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T16:28:49.560Z
Answers.Text: Did you try adding above line in civicrm.settings.php?
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T19:31:09.720Z
Answers.Text: Yes. Added the two lines too civicrm.settings.php. Ensured no trailing slash for CIVICRM_UF_BASEURL. I can see in the browser console that the URL for the creditor js file looks right, but I'm still getting a 404 on that URL. Wondering if Wordpress is at fault there. Looking into it.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T19:36:04.567Z
Answers.Text: can you please confirm if global $civicrm_root, $civicrm_setting, $civicrm_paths; is present in your civi settings php file on top of the file?
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T19:43:05.093Z
Answers.Text: I can see that the path to the js file is actually incorrect. Should be https://mydomain.org/wp-content/plugins/civicrm/civicrm/js/wysiwyg/crm.ckeditor... but I'm seeing https://mydomain.org/wp-content/plugins/civicrm/civicrmjs/wysiwyg/crm.ckeditor... i.e. lost a slash between civicrm and js
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T19:45:38.983Z
Answers.Text: $civicrm_setting, $civicrm_paths, global $civicrm_root all present
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T20:09:38.930Z
Answers.Text: Updated my answer to add '/' at the end of userFrameworkResourceURL and civicrm.root
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T20:21:48.443Z
Answers.Text: After adding those trailing slashes the browser console now reports the 404 path as https://mydomain.org/app/data/wp-content/uploads/civicrm/persist/crm-ckeditor-default.js?t=I3I8
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T20:25:39.270Z
Answers.Text: path variables as reported through the UI at Administer > System Setting > Directories are: [cms.root] = /app/code; [civicrm.root] = /app/data/wp-content/plugins/civicrm/civicrm (no trailing slash); [civicrm.files]=/app/data/wp-content/uploads/civicrm
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T20:26:03.227Z
Answers.Text: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/103356/discussion-between-pradeep-nayak-and-graham).
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-18T11:44:15.990Z
Answers.Text: wondering whether the problem reported at https://civicrm.stackexchange.com/questions/37628/links-to-a-contribution-page-with-checksum-and-contact-id-generate-a-fatal-error relates to this. Seems specific to Cloudron.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T15:42:17.893Z
Answers.LastActivityDate: 2020-01-15T20:59:42.163Z
Answers.LastEditDate: 2020-01-15T20:59:42.163Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I have CiviCRM 5.18 running with Wordpress on a server where the Wordpress instance is managed by Cloudron (<a href="https://cloudron.io" rel="nofollow noreferrer">https://cloudron.io</a>). Several other web applications being used as well on the same server, and handling all the updates is greatly simplified by using Cloudron. The CiviCRM settings needed to be tweaked slightly to get it to work: essentially from what I can see the Wordpress code sits in a directory /app/code (which is managed by Cloudron) apart from the wp-content directory which sits in /app/data/ with a symlink.</p>
  
  <p>so, in my civicrm.settings.php file I have:</p>
  
  <p>$civicrm_root = /app/data/wp-content/plugins/civicrm/civicrm/</p>
  
  <p>CiviCRM  reports:</p>
  
  <p>[cms.root] as /app/code</p>
  
  <p>[civicrm.root] as /app/data/wp-content/plugins/civicrm/civicrm</p>
  
  <p>[civicrm.files] as /app/data/wp-content/uploads/civicrm</p>
  
  <p>So far so good, and CiviCRM appears to be working flawlessly, with one exception: the WYSIWYG editor isn't loading.</p>
  
  <p>For example, on the 'Memberships' tab of a contribution page, where I would expect to see rich text editor fields for the message text for new memberships and renewals, I'm just seeing standard text fields.</p>
  
  <p>My browser console reports a 404 error on these pages, saying that it failed to load the resource at <a href="https://mydomain.org/app/data/wp-content/plugins/civicrm/civicrm/js/wysiwyg/crm.ckeditor.js?r=UgnWN" rel="nofollow noreferrer">https://mydomain.org/app/data/wp-content/plugins/civicrm/civicrm/js/wysiwyg/crm.ckeditor.js?r=UgnWN</a></p>
  
  <p>The URL it should be using is <a href="https://mydomain.org/wp-content/plugins/civicrm/civicrm/js/wysiwyg/crm.ckeditor.js?r=UgnWN" rel="nofollow noreferrer">https://mydomain.org/wp-content/plugins/civicrm/civicrm/js/wysiwyg/crm.ckeditor.js?r=UgnWN</a> so for some reason it is incorrectly constructing the URL.</p>
  
  <p>I'm thinking that I could/should be able to override this URL in civicrm.settings.php and so avoid the issue, but I'not sure what variable I need to be setting there. Can anyone advise?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-15T15:33:06.777Z
Comments.Text: Kindly check resources url
Comments.UserDisplayName: Pradeep Nayak
Tags: <ckeditor><civicrm.settings.php>
Title: How can I get the WYSIWYG editor to appear when using CiviCRM with Wordpress on Cloudron?
ThreadText: # How can I get the WYSIWYG editor to appear when using CiviCRM with Wordpress on Cloudron?
  
  (Asked by: username_0 on 2020-01-15)
  
  I have CiviCRM 5.18 running with Wordpress on a server where the Wordpress instance is managed by Cloudron (<https://cloudron.io>). Several other web applications being used as well on the same server, and handling all the updates is greatly simplified by using Cloudron. The CiviCRM settings needed to be tweaked slightly to get it to work: essentially from what I can see the Wordpress code sits in a directory /app/code (which is managed by Cloudron) apart from the wp-content directory which sits in /app/data/ with a symlink.
  
  so, in my civicrm.settings.php file I have:
  
  $civicrm\_root = /app/data/wp-content/plugins/civicrm/civicrm/
  
  CiviCRM reports:
  
  [cms.root] as /app/code
  
  [civicrm.root] as /app/data/wp-content/plugins/civicrm/civicrm
  
  [civicrm.files] as /app/data/wp-content/uploads/civicrm
  
  So far so good, and CiviCRM appears to be working flawlessly, with one exception: the WYSIWYG editor isn't loading.
  
  For example, on the 'Memberships' tab of a contribution page, where I would expect to see rich text editor fields for the message text for new memberships and renewals, I'm just seeing standard text fields.
  
  My browser console reports a 404 error on these pages, saying that it failed to load the resource at <https://mydomain.org/app/data/wp-content/plugins/civicrm/civicrm/js/wysiwyg/crm.ckeditor.js?r=UgnWN>
  
  The URL it should be using is <https://mydomain.org/wp-content/plugins/civicrm/civicrm/js/wysiwyg/crm.ckeditor.js?r=UgnWN> so for some reason it is incorrectly constructing the URL.
  
  I'm thinking that I could/should be able to override this URL in civicrm.settings.php and so avoid the issue, but I'not sure what variable I need to be setting there. Can anyone advise?
  
  **Tags:** ckeditor, civicrm.settings.php
  
  > **Comments:**
  > **username_1**: Kindly check resources url  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-01-15. Score: 1 | Accepted answer
  
  This is because your cms.root doesn't match properly with civicrm.root variable and you might be using variables in Resource url for 'CiviCRM Resource URL'.
  
  For such cases you add below two line at the end of the file you will need to change
  
  `$civicrm_root = '/app/data/wp-content/plugins/civicrm/civicrm/';` to `$civicrm_root = '/app/code/wp-content/plugins/civicrm/civicrm/';`
  
  ```
  $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = CIVICRM_UF_BASEURL . 'wp-content/plugins/civicrm/civicrm';civicrm/';                                                                                                     
  $civicrm_paths['civicrm.root']['url'] = CIVICRM_UF_BASEURL . 'wp-content/plugins/civicrm/civicrm';civicrm/';
  
  ```
  
  Thanks
  
  username_1
  
  > **Comments:**
  > **username_0**: thanks username_1. My Resource URL is currently set in my settings file as https://mydomain.org/wp-content/plugins/civicrm/civicrm  
  > **username_1**: Did you try adding above line in civicrm.settings.php?  
  > **username_0**: Yes. Added the two lines too civicrm.settings.php. Ensured no trailing slash for CIVICRM_UF_BASEURL. I can see in the browser console that the URL for the creditor js file looks right, but I'm still getting a 404 on that URL. Wondering if Wordpress is at fault there. Looking into it.  
  > **username_1**: can you please confirm if global $civicrm_root, $civicrm_setting, $civicrm_paths; is present in your civi settings php file on top of the file?  
  > **username_0**: I can see that the path to the js file is actually incorrect. Should be https://mydomain.org/wp-content/plugins/civicrm/civicrm/js/wysiwyg/crm.ckeditor... but I'm seeing https://mydomain.org/wp-content/plugins/civicrm/civicrmjs/wysiwyg/crm.ckeditor... i.e. lost a slash between civicrm and js  
  > **username_0**: $civicrm_setting, $civicrm_paths, global $civicrm_root all present  
  > **username_1**: Updated my answer to add '/' at the end of userFrameworkResourceURL and civicrm.root  
  > **username_0**: After adding those trailing slashes the browser console now reports the 404 path as https://mydomain.org/app/data/wp-content/uploads/civicrm/persist/crm-ckeditor-default.js?t=I3I8  
  > **username_0**: path variables as reported through the UI at Administer > System Setting > Directories are: [cms.root] = /app/code; [civicrm.root] = /app/data/wp-content/plugins/civicrm/civicrm (no trailing slash); [civicrm.files]=/app/data/wp-content/uploads/civicrm  
  > **username_1**: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/103356/discussion-between-username_1-and-username_0).  
  > **username_0**: wondering whether the problem reported at https://civicrm.stackexchange.com/questions/37628/links-to-a-contribution-page-with-checksum-and-contact-id-generate-a-fatal-error relates to this. Seems specific to Cloudron.  
  
  ---
  
  