CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • CKEditor not working on any page/form
Pages: [1] 2

Author Topic: CKEditor not working on any page/form  (Read 7236 times)

pbarmak

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 3
  • CiviCRM version: 3.3.5
  • CMS version: Pressflow 6.19
  • MySQL version: 5.1
  • PHP version: 5.2.10
CKEditor not working on any page/form
December 17, 2010, 03:53:06 pm
I've been setting up a new instance of Civi (tried both 3.2.5 and 3.3.1).  I keep getting errors whenever a page that invokes CKEditor loads.  The page does not show the textarea box (just a blank space that you can't type in).

I get the following errors in my Firefox console (and IE shows the last error as well).  Can anyone point me in the right direction for these types of errors?  It's interesting that it only happens within Civi (whenever I used ckeditor on non-civi drupal pages, it works fine).

Code: [Select]
Error: syntax error
Source File: http://cms.forwardedge.org/civicrm/event/config.js?t=A5AB4B6
Line: 1
Source Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

Error: The stylesheet http://cms.forwardedge.org/civicrm/event/skins/kama/editor.css?t=A5AB4B6 was not loaded because its MIME type, "text/html", is not "text/css".
Source File: http://cms.forwardedge.org/civicrm/event/add&reset=1&action=add
Line: 0

Error: syntax error
Source File: http://cms.forwardedge.org/civicrm/event/lang/en.js?t=A5AB4B6
Line: 1
Source Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

Error: l.lang.contextmenu is undefined
Source File: http://cms.forwardedge.org/sites/all/modules/civicrm/packages/ckeditor/ce.d43da2e9f4cc40b2ad9b384fe5e1f35b.ckeditor,l.js
Line: 44

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CKEditor not working on any page/form
December 17, 2010, 06:16:28 pm
Hmm - I'm not seeing that error on my 3.3 site, nor on the public demo. Wondering if someone added some directives to http://cms.forwardedge.org/civicrm/event/config.js - since I don't see any reference to skins/kama/editor.css in my config.js file (the default).
Protect your investment in CiviCRM by  becoming a Member!

pbarmak

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 3
  • CiviCRM version: 3.3.5
  • CMS version: Pressflow 6.19
  • MySQL version: 5.1
  • PHP version: 5.2.10
Re: CKEditor not working on any page/form
December 17, 2010, 07:36:35 pm
Dave, what I'm showing comes directly from a fresh install of 3.2.5 (and i also tried 3.3.1), so I'm not sure what might be added.

Where does "civicrm/event/config.js" point to on the filesystem?  The only config I know is under packages/ckeditor and it's also the default.

Thanks, appreciate the help.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CKEditor not working on any page/form
December 17, 2010, 09:27:08 pm
No idea - that path doesn't make sense to me, we never put css files in a path like that afaik (they're either under css/ or part of packages).
Protect your investment in CiviCRM by  becoming a Member!

jackbravo

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal 7
  • MySQL version: 5.0
  • PHP version: 5.3
Re: CKEditor not working on any page/form
September 08, 2011, 08:44:05 am
I'm having the same error.

After checking the source for the HTML I'm getting from civicrm i see that the path for the ckeditor.js file is: "/packages/ckeditor/ckeditor.js" instead of "/sites/all/modules/civicrm/packages/ckeditor/ckeditor.js". Where is this path defined?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CKEditor not working on any page/form
September 15, 2011, 04:01:35 pm
Check Resource URL value (CiviCRM > Administer > Global Settings)
Protect your investment in CiviCRM by  becoming a Member!

jackbravo

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal 7
  • MySQL version: 5.0
  • PHP version: 5.3
Re: CKEditor not working on any page/form
September 19, 2011, 04:52:28 pm
The resource URL value seems to be ok. It shows sites/all/modules/civicrm

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CKEditor not working on any page/form
September 19, 2011, 05:21:09 pm
Not sure what's happening on your site :-(
Try debugging from templates/CRM/common/drupal.tpl and chk the values of $config->resourceBase

Code: [Select]
    <script type="text/javascript" src="{$config->resourceBase}packages/ckeditor/ckeditor.js"></script>
Protect your investment in CiviCRM by  becoming a Member!

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: CKEditor not working on any page/form
January 13, 2014, 06:59:05 am
Was there ever a resolution to this? I am experiencing the same issue on 4.3 and then still experiencing issue after upgrade to 4.4.3. Resource URL looks fine.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CKEditor not working on any page/form
January 13, 2014, 12:18:05 pm
Emily - First check for Javascript errors being reported by your brower / by Firebug.

If that's not clarifying the problem, next step is to 'view source' on one of the pages that should show ckEditor and look for the <script> tag:
Code: [Select]
<script type="text/javascript" src="/sites/civicrm44/modules/civicrm/packages/ckeditor/ckeditor.js"></script>

If the path looks correct, then double-check it by pasting that path in your browser URL bar (immediately after the base URL of your site). You should see a page full of javascript code if things are configured properly.

Protect your investment in CiviCRM by  becoming a Member!

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: CKEditor not working on any page/form
January 14, 2014, 07:22:54 am
Hi Dave,

Thanks for responding. I do indeed see the full javascript code when I copy and paste the url into my browser, so I believe it is configured correctly.

The site is under htaccess but I've attached a screenshot showing the url loading ckeditor.js. I copied and pasted that directly from the javascript error. I also included screenshots of the error in the console as well as the link for ckeditor.js file while hovering over the error.

What to try next?

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: CKEditor not working on any page/form
January 14, 2014, 07:24:03 am
This is happening for me on CiviCRM 4.4.3 with Drupal 7.

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: CKEditor not working on any page/form
January 14, 2014, 08:06:15 am
Using Firebug on the net tab to get the html response, here is the output of the html for the textarea...hoping this might help debug this. Again, this is happening on every civicrm textarea field.

Code: [Select]
<tr class="crm-event-manage-eventinfo-form-block-description">
      <td class="label"><label for="description">Complete Description</label></td>
      <td><textarea rows="8" cols="60" editor="ckeditor" name="description" id="description" class="form-CKeditor"></textarea><script type='text/javascript'>
                cj( function( ) {
                    cj('#description').removeClass();
                    if ( CKEDITOR.instances['description'] ) {
                        CKEDITOR.remove(CKEDITOR.instances['description']);
                    }
                    if ( cj('#description').val( ) == '' ) cj('#description').val('&nbsp;');
                    CKEDITOR.replace( 'description' );
                    var editor = CKEDITOR.instances['description'];
                    if ( editor ) {
                        editor.on( 'key', function( evt ){
                            global_formNavigate = false;
                        } );
                        editor.config.width              = '94%';
                        editor.config.height             = '400';
                        editor.config.filebrowserBrowseUrl      = 'http://mysite.org/sites/all/modules/civicrm/packages/kcfinder/browse.php?cms=civicrm&type=files';
                        editor.config.filebrowserImageBrowseUrl = 'http://mysite.org/sites/all/modules/civicrm/packages/kcfinder/browse.php?cms=civicrm&type=images';
                        editor.config.filebrowserFlashBrowseUrl = 'http://mysite.org/sites/all/modules/civicrm/packages/kcfinder/browse.php?cms=civicrm&type=flash';
                        editor.config.filebrowserUploadUrl      = 'http://mysite.org/sites/all/modules/civicrm/packages/kcfinder/upload.php?cms=civicrm&type=files';
                        editor.config.filebrowserImageUploadUrl = 'http://mysite.org/sites/all/modules/civicrm/packages/kcfinder/upload.php?cms=civicrm&type=images';
                        editor.config.filebrowserFlashUploadUrl = 'http://mysite.org/sites/all/modules/civicrm/packages/kcfinder/upload.php?cms=civicrm&type=flash';
                    }
                });
            </script></td>
    </tr>

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: CKEditor not working on any page/form
January 14, 2014, 09:13:18 am
It's hard to tell from that error message in firebug what's going on. A stacktrace would be helpful. Try enabling your "Script" panel and then turn on "Show stack trace with errors" in the firebug console menu.
Try asking your question on the new CiviCRM help site.

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: CKEditor not working on any page/form
January 14, 2014, 09:50:47 am
OK - new screenshot attached after enabling stacktrace and reloading and expanding errors. Thanks much!

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • CKEditor not working on any page/form

This forum was archived on 2017-11-26.