1 |
85ad3d82
|
Assos Assos
|
|
2 |
|
|
Note: the HTML version of this file (always up-to-date) is available online: http://drupal.ckeditor.com/troubleshooting
|
3 |
|
|
|
4 |
|
|
CONTENTS OF THIS FILE
|
5 |
|
|
---------------------
|
6 |
|
|
|
7 |
|
|
* CKEditor does not work in my theme
|
8 |
|
|
* Known module incompatibilities
|
9 |
|
|
* Images are not displayed when submitted
|
10 |
|
|
* I followed the instructions, but CKEditor does not show up (+ debugging instructions)
|
11 |
|
|
* Selected toolbar does not show for user 1
|
12 |
|
|
* The CKEditor component is not installed correctly
|
13 |
|
|
* CKEditor does not work after upgrading
|
14 |
|
|
* Text alignment does not work
|
15 |
|
|
* Line breaks removed when editing content previously authored without using CKEditor
|
16 |
|
|
* I successfully uploaded an image, but cannot see it in the file browser
|
17 |
|
|
* Quote symbols are being changed to quote entities
|
18 |
|
|
|
19 |
|
|
CKEditor does not work in my theme
|
20 |
|
|
----------------------------------
|
21 |
|
|
|
22 |
|
|
Your theme may be missing the following code:
|
23 |
|
|
|
24 |
|
|
<?php print $scripts; ?>
|
25 |
|
|
|
26 |
|
|
Add that line of code to the head section of your theme.
|
27 |
|
|
|
28 |
|
|
Another possibility is that the following code might be missing in your theme:
|
29 |
|
|
|
30 |
|
|
<?php print $closure; ?>
|
31 |
|
|
|
32 |
|
|
The solution is similar as above - you need to add that line to your theme at the end of its code.
|
33 |
|
|
|
34 |
|
|
Finally, you can also switch to a different theme.
|
35 |
|
|
|
36 |
|
|
Known module incompatibilities
|
37 |
|
|
------------------------------
|
38 |
|
|
|
39 |
|
|
At the moment CKEditor will not show up when the following modules are enabled:
|
40 |
|
|
|
41 |
|
|
* Theme developer (http://drupal.org/node/318941)
|
42 |
|
|
* Theme Builder (http://drupal.org/node/271032)
|
43 |
|
|
|
44 |
|
|
Images are not displayed when submitted
|
45 |
|
|
---------------------------------------
|
46 |
|
|
|
47 |
|
|
Most probably you need to properly configure the input format. Either set it to "Full HTML" or add the <img> tag to the "Filtered HTML" format.
|
48 |
|
|
The full list of tags that should be allowed is available in the README.txt file.
|
49 |
|
|
Make sure that you have read the "Setting up filters" section in the README.txt file or on this page: http://drupal.ckeditor.com/filters
|
50 |
|
|
|
51 |
|
|
I followed the instructions, but CKEditor does not show up
|
52 |
|
|
----------------------------------------------------------
|
53 |
|
|
|
54 |
|
|
First of all make sure that CKEditor is enabled on this specific page.
|
55 |
|
|
Take a look into the source code of your page and search for something similar to:
|
56 |
|
|
"ckeditor": { "module_path":
|
57 |
|
|
|
58 |
|
|
If you cannot find such code, it means that CKEditor is disabled on that page/field.
|
59 |
|
|
Make sure that you have the right permissions to use CKEditor and check your CKEditor profile (include/exclude settings, minimum rows value).
|
60 |
|
|
|
61 |
|
|
If CKEditor is enabled, but it does not show up, try the following steps:
|
62 |
|
|
|
63 |
|
|
1. Switch to the default theme (Garland). If CKEditor appears, read the "CKEditor does not work in xxx theme" instructions.
|
64 |
|
|
If your theme already contains the "closure" and "scripts" statements, read below.
|
65 |
|
|
2. Make sure that you are using a browser that is compatible with CKEditor.
|
66 |
|
|
3. On some occasions other installed modules may cause CKEditor not to show up (although if you look at page source, you will see the CKEditor code).
|
67 |
|
|
Instead of CKEditor you may see a very small textarea.
|
68 |
|
|
This mostly happens when some other module causes a JavaScript error and CKEditor cannot load because of this.
|
69 |
|
|
To check this:
|
70 |
|
|
- Write down the list of currently installed modules.
|
71 |
|
|
- Disable all additional modules.
|
72 |
|
|
- If CKEditor shows up, start enabling the modules that you disabled in the previous step and find out which module is incompatible with CKEditor.
|
73 |
|
|
Use the project's site to report a new bug and provide the following details:
|
74 |
|
|
* Drupal version,
|
75 |
|
|
* CKEditor module version,
|
76 |
|
|
* CKEditor version,
|
77 |
|
|
* The name and version of the incompatible module.
|
78 |
|
|
* If additional steps are required to reproduce this issue, like creating a new special content or configuring this additional module in a special way, provide a detailed list of steps to follow.
|
79 |
|
|
- If the step above did not help, disable all additional modules and switch to the Garland theme. Clear the browser cache.
|
80 |
|
|
If CKEditor still does not work, it means that it may be corrupted.
|
81 |
|
|
Upload CKEditor again using an FTP client that warns you when files are truncated or corrupted.
|
82 |
|
|
- If CKEditor works for the Garland theme with all modules enabled, but it does not work for your theme with all modules disabled, then your theme is a problem.
|
83 |
|
|
Use the project's site to report a new bug and provide the following details:
|
84 |
|
|
* Drupal version,
|
85 |
|
|
* CKEditor module version,
|
86 |
|
|
* CKEditor version,
|
87 |
|
|
* The name and version of the incompatible theme.
|
88 |
|
|
4. Finally, if nothing helped, to find out where exactly the error occurred, you may use Firefox with the Firebug extension.
|
89 |
|
|
Use the project's site to create a new support request providing as much information as possible, including the exact JavaScript error message that you got.
|
90 |
|
|
|
91 |
|
|
Selected toolbar does not show for user 1
|
92 |
|
|
-----------------------------------------
|
93 |
|
|
|
94 |
|
|
There are two reasons why you are seeing a different toolbar (or do not see CKEditor at all):
|
95 |
|
|
|
96 |
|
|
- If "Allow users to customize CKEditor appearance" is enabled, each user
|
97 |
|
|
may override the profile settings in the "Rich text editor settings" section of the admin/user/N/edit page
|
98 |
|
|
("My Account" -> "Edit")
|
99 |
|
|
|
100 |
|
|
- A different profile is used for user 1 than you expect.
|
101 |
|
|
User 1 must be assigned a system role that corresponds to the privileges required.
|
102 |
|
|
If no role is assigned to User 1, they will have the privileges of an "authenticated user"
|
103 |
|
|
(usually it is the "Advanced" profile).
|
104 |
|
|
|
105 |
|
|
The CKEditor component is not installed correctly
|
106 |
|
|
-------------------------------------------------
|
107 |
|
|
|
108 |
|
|
Please remember that installing the CKEditor module is a two-step process. You need to download and unpack:
|
109 |
|
|
- the CKEditor module that integrates CKEditor with Drupal;
|
110 |
|
|
- CKEditor, the rich text editor.
|
111 |
|
|
|
112 |
|
|
If your CKEditor does not show, you should check whether all files were extracted correctly.
|
113 |
|
|
The /modules/ckeditor/ckeditor/ directory should contain the following files:
|
114 |
|
|
ckeditor.js, config.js, contents.css as well as directories named "skins", "themes", "lang", "images".
|
115 |
|
|
|
116 |
|
|
The correct directory structure is as follows:
|
117 |
|
|
modules <dir>
|
118 |
|
|
ckeditor <dir>
|
119 |
|
|
ckeditor.module
|
120 |
|
|
ckeditor.admin.inc
|
121 |
|
|
...
|
122 |
|
|
ckeditor <dir>
|
123 |
|
|
_source <dir>
|
124 |
|
|
images <dir>
|
125 |
|
|
lang <dir>
|
126 |
|
|
plugins <dir>
|
127 |
|
|
skins <dir>
|
128 |
|
|
themes <dir>
|
129 |
|
|
COPY_HERE.txt
|
130 |
|
|
ckeditor.js
|
131 |
|
|
...
|
132 |
|
|
|
133 |
|
|
CKEditor does not work after upgrading
|
134 |
|
|
--------------------------------------
|
135 |
|
|
|
136 |
|
|
This may be caused by the browser cache. Clear your browser cache and restart the browser if clearing the cache did not help.
|
137 |
|
|
If you upgraded the CKEditor module, make sure that all roles with "access ckeditor" permissions are assigned to at least one CKEditor profile.
|
138 |
|
|
|
139 |
|
|
Text alignment does not work
|
140 |
|
|
----------------------------
|
141 |
|
|
|
142 |
|
|
In the ckeditor.config.js file (located in the CKEditor module directory), the following classes are defined to provide the text alignment functionality:
|
143 |
|
|
config.justifyClasses = [ 'rteleft', 'rtecenter', 'rteright', 'rtejustify' ];
|
144 |
|
|
|
145 |
|
|
Unfortunately, some themes may override these styles and text alignment may not work as expected.
|
146 |
|
|
If you are using the Full HTML input format, you may simply comment out this line:
|
147 |
|
|
//config.justifyClasses = [ 'rteleft', 'rtecenter', 'rteright', 'rtejustify' ];
|
148 |
|
|
|
149 |
|
|
CKEditor will then use inline styles instead: <p style="text-align: right;">sample text</p>.
|
150 |
|
|
The problem is that inline styles may only be used with the Full HTML format.
|
151 |
|
|
Filtered HTML will strip that code, so do not use this solution with this input format.
|
152 |
|
|
|
153 |
|
|
For Filtered HTML things are a bit more complicated. For example if your theme defines such CSS style:
|
154 |
|
|
|
155 |
|
|
.content p { text-align: left; }
|
156 |
|
|
|
157 |
|
|
the text-align property set in the .rteright class will not work.
|
158 |
|
|
To align the <p> tag, you will have to edit the modules/ckeditor/ckeditor.css file and create a style that will be applied to the <p> tag:
|
159 |
|
|
|
160 |
|
|
.content p.rteleft {
|
161 |
|
|
text-align: left;
|
162 |
|
|
}
|
163 |
|
|
.content p.rteright {
|
164 |
|
|
text-align: right;
|
165 |
|
|
}
|
166 |
|
|
.content p.rtecenter {
|
167 |
|
|
text-align: center;
|
168 |
|
|
}
|
169 |
|
|
.content p.rtejustify {
|
170 |
|
|
text-align: justify;
|
171 |
|
|
}
|
172 |
|
|
|
173 |
|
|
Use DOM inspector (in Firefox) to check why the alignment does not work and to correct your CSS styles.
|
174 |
|
|
There is no universal workaround for this situation.
|
175 |
|
|
|
176 |
|
|
Line breaks removed when editing content previously authored without using CKEditor
|
177 |
|
|
-----------------------------------------------------------------------------------
|
178 |
|
|
|
179 |
|
|
The problem lies in the way you configured your input filters.
|
180 |
|
|
Before you enabled CKEditor, you probably had the Line break converter enabled.
|
181 |
|
|
|
182 |
|
|
Now you are trying to edit the same content with the Line break converter disabled, thus the line breaks are removed.
|
183 |
|
|
|
184 |
|
|
Possible workarounds:
|
185 |
|
|
* Enable the Line break converter (not recommended).
|
186 |
|
|
* Create a new input format with the Line break converter enabled. Use it just for old articles (recommended).
|
187 |
|
|
* Start with CKEditor disabled by default, replace all new line characters manually with a <br> tag, then use toggle to switch to WYSIWYG mode.
|
188 |
|
|
|
189 |
|
|
If you are a PHP programmer, you may try the approach proposed by BakerQ in http://drupal.org/node/240633
|
190 |
|
|
|
191 |
|
|
Quote symbols are being changed to quote entities
|
192 |
|
|
-------------------------------------------------
|
193 |
|
|
|
194 |
|
|
Some modules like Typogrify or SmartyPants require special handling of HTML entities.
|
195 |
|
|
For example, by default CKEditor will convert a double quote character (") to ".
|
196 |
|
|
To disable processing of HTML entities, add the following line to the modules/ckeditor/ckeditor.config.js file:
|
197 |
|
|
|
198 |
|
|
config.entities = false;
|
199 |
|
|
|
200 |
|
|
It is also possible to disable processing of HTML entities for a selected CKEditor profile by adding the following line in "Advanced Options" -> "Custom JavaScript configuration":
|
201 |
|
|
|
202 |
|
|
entities = false;
|
203 |
|
|
|
204 |
|
|
CKEditor toolbar does not show up
|
205 |
|
|
---------------------------------
|
206 |
|
|
|
207 |
|
|
If the CKEditor toolbar does not show up and the styles/themes seem to be corrupted, it is possible that you uploaded the files via FTP in the ASCII mode.
|
208 |
|
|
Make sure you are uploading the files in the binary mode.
|
209 |
|
|
|
210 |
|
|
CKEditor adds <p> </p>
|
211 |
|
|
---------------------------
|
212 |
|
|
|
213 |
|
|
Sometimes you may notice that when editing nodes, the spacing between paragraphs is being doubled.
|
214 |
|
|
This may be caused by the HTML Purifier module when the AutoParagraph option is enabled.
|
215 |
|
|
When you disable it, make sure you clear the HTML Purifier cache. |