Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After upgrading to 6.x-1.9, when editing an existing node the current body text is not displayed. CKeditor itself shows up, however the body field stays blank.
ckeditor module 6.x-1.0
CKEditor 3.6.2
Drupal 6.25
Firefox 10.0.2 (Ubuntu)
This may be related to #1190772: Fields Vanish When Editing Nodes After Upgrading to 6.x.1.4 (6.x) or #1318196: Content disappearing (7.x).
Comment | File | Size | Author |
---|---|---|---|
#29 | 0001-1482874-by-dczepierga-body-field-is-blank.patch | 5.71 KB | dczepierga |
Comments
Comment #1
gaele CreditAttribution: gaele commentedI did resave all profiles and cleared all caches.
Firebug does not show any errors.
Comment #2
gaele CreditAttribution: gaele commentedReverting back to 6.x-1.8 resolves the issue.
Comment #3
jvieille CreditAttribution: jvieille commented- As 1.9 seems broken, I tried the latest dev : the text appears unformatted in the ckeditor area
- reverting to the previous dev (before 1.9) makes the area blank
- flushing the cash makes it working again
1.9 and after are definitely broken.
Comment #4
GoddamnNoise CreditAttribution: GoddamnNoise commentedSame problem here. Is there any solution to fix it or the only solution is to revert back to 1.8?
Comment #5
dczepierga CreditAttribution: dczepierga commentedHi,
Could u try to update to last stable release?
Before was problem with loading CKEditor during AJAX call executing (Filter XSS), so then u can see blank page - it was fixed in last release and now should works fine.
Pls check that, and write does it help or not.
Greetings
Comment #6
jvieille CreditAttribution: jvieille commentedI tried the latest dev, but got a messy unformatted text
Comment #7
mkesicki CreditAttribution: mkesicki commented@jvieille,
what input filter do you use ?
Comment #8
jvieille CreditAttribution: jvieille commentedfull html
But I do not get raw text, html tags are not visible
Comment #9
mkesicki CreditAttribution: mkesicki commentedWhat filters do you use In your "Full html" input format ?
Comment #10
wwalc CreditAttribution: wwalc commented@anyone with the same issue - any chance for a private message with a link where this issue can be reproduced? No changes will be made on the site, I need to see the configuration and the list of 3rd party modules, inspect JavaScript variables and check for JavaScript errors.
Alternatively can you check a fresh installation of Drupal and once you confirm that CKEditor works there, start enabling all other third party modules that you have enabled on your live website?
Do you all have the jQuery Update module installed?
Comment #11
GoddamnNoise CreditAttribution: GoddamnNoise commentedI think i've found what is causing this problem. In my case, the body field is blank only when the "HTML corrector" filter is checked in the CKEditor's profile configuration. If I uncheck the "HTML corrector" filter in the CKEditor's profile configuration, it works as usual and i can see the content of the body field, but when i check again the filter, then the body field is blank.
Drupal 6.23
CKEditor 6.x-1.10
Comment #12
wwalc CreditAttribution: wwalc commentedInteresting, can you investigate tit deeper? E.g whether it happens on all pages?
I just tried to enable HTML corrector and I have no problems with reediting articles.
What other filters do you have enabled in CKEditor profile?
Comment #13
GoddamnNoise CreditAttribution: GoddamnNoise commentedYes, it always happens. When i try to edit any node, the body field is always blank. The filters i've enabled in CKEditor profile are: HTML filter and HTML corrector. But I have the same problem when only the HTML corrector filter is enabled.
Comment #14
wwalc CreditAttribution: wwalc commented@GoddamnNoise Could you enable HTML corrector again?
Open Firebug to trace Ajax calls and edit any article
When CKEditor loads, you should see something like:
POST http://example.com/index.php?q=ckeditor/xss
can you check what's the result of the response in the "Response" tab?
If it's just a blank page, can you check the error logs / dblog / any other place where PHP errors are logged?
Comment #15
jvieille CreditAttribution: jvieille commentedI got the blank area too when reverting back to a previous versions.
A made a full cleaning of all caches (Boost, Advagg...) several times before I could again work with CKeditor.
My messy area might have been due to something like that too. I'll make some more trials when I'll have time.
Comment #16
GoddamnNoise CreditAttribution: GoddamnNoise commentedHi, @wwalc,
I've enabled the HTML corrector again, and I've traced the Ajax calls with Firefox's Firebug:
The "Response" tab for "POST http://example.com/index.php?q=ckeditor/xss" is blank. I've checked the dblog looking for PHP errors, but there is no PHP errors in the log. No errors in the Apache logs.
The problem happens with Firefox and with Chromium 17.0.963.79 for Ubuntu 10.04 too.
Comment #17
mkesicki CreditAttribution: mkesicki commented@GoddamnNoise,
please check in Firebug 'POST' tab of 'http://example.com/index.php?q=ckeditor/xss'reuqest if there goes any data.
Does 'text' and 'token' values are sent via POST request ?
Can you attach some text with you have problems ? Of course if is not 'secret'.
Comment #18
GoddamnNoise CreditAttribution: GoddamnNoise commentedI've checked it. Yes, there is data in the "Post" tab. Both, the "text" and "token" values are sent via POST request.
I can't attach the actual text, but it's happening with every node, so it must happens with any text. So, to confirm that, I've createad a new node with this values:
"Title" Field: "CKEditor Test"
"Body" Field: "CKEditor Test"
I've saved the node, and I've tried to edit the node. Then, I see a blank body field. In the "Post" tab of the Firebug console for the 'http://example.com/index.php?q=ckeditor/xss' POST request, i see the "text" and token values. The "text" value is: "
<p>CKEditor Test</p>
"Comment #19
GoddamnNoise CreditAttribution: GoddamnNoise commentedHi again,
I've been testing the code a few times to gather some information which could help. This is what I think it is happening:
ckeditor_user_get_profile()
is called once. This function looks for the CKEditor profile and it returns that profile.ckeditor_user_get_profile()
is called twice. The first time, this function looks for the CKEditor profile and it returns that profile. But the second time, this function is called from theckeditor_filter_xss()
function, so it looks for the CKEditor profile but it returns FALSE because the$element_id
variable is empty and the$_GET['q']
environment variable has the value 'ckeditor/xss'.
I think that is the problem happening here. Any ideas about how to fix it?.
Comment #20
dczepierga CreditAttribution: dczepierga commented@GoddamnNoise, thx for review, but i need one more information:
When
ckeditor_user_get_profile()
is called twice, do u know from where this function is called first time?$element_id
in this place is not needed, it's only use global variable$user
- could u check what get there on first and second call?Greetings
Comment #21
GoddamnNoise CreditAttribution: GoddamnNoise commentedHi,
The first call to the
ckeditor_user_get_profile()
function is from theckeditor.module
file,ckeditor_process_textarea
function,line 502
.The $user received in
ckeditor_user_get_profile()
is correct in both cases (i've checked$user->uid
and it is the same in both cases).I had never checked the CKEditor's code before, but I think the problem is located here. I think the problem arises because the
ckeditor_user_get_profile()
function is called from theckeditor_filter_xss()
function.I've reviewed CKEditor's code in previous versions and in those versions, the
ckeditor_user_get_profile()
function is not called from theckeditor_filter_xss()
function. Instead, when theckeditor_filter_xss()
function is called, it receives a$POST['filters']
with the filters to apply.But, in the new CKEditor version,
$POST['filters']
doesn't exist and the functionckeditor_user_get_profile()
is called from theckeditor_filter_xss()
function to get that information (this is the second call to that function). In the new CKEditor version, when theckeditor_user_get_profile()
function tries to get that information, it calls theckeditor_is_enabled()
function, which, in this second call, always returns FALSE, so theckeditor_user_get_profile()
function returns FALSE too and doesn't return the CKEditor's user profile as expected.The function
ckeditor_is_enabled()
returns FALSE because it receives NULL in the$element_id
variable and it receives 'ckeditor/xss' as$GET['q']
, so it can't get the node type calling theckeditor_get_nodetype()
function.Comment #22
jvieille CreditAttribution: jvieille commentedIn my case, my full htpl filter uses the following:
Comment #23
mkesicki CreditAttribution: mkesicki commentedI can't reproduce this issue. I tried use all mentioned filters with different order (rearrange) and still nothing.
Can you write what settings do you have in "Fields to exclude/include" settings ?
It is possibly to get access to some test site where this issue exists (as mentioned #10)
Comment #24
GoddamnNoise CreditAttribution: GoddamnNoise commentedHi,
One question, when you try to reproduce this issue, are you logged in with uid=1 (super admin)?. The issue won't arise if you are logged in as uid=1. To reproduce the issue you must create a CKEditor user profile, activate the "HTML Corrector" filter for that profile and try it logged in with a user who has that CKEditor user profile.
In my case these are the fields i have in "Fields to exclude/include" (I have checked the "include" option):
Sorry, but I can't give you access to a site where this issue exists.
Comment #25
neurer CreditAttribution: neurer commentedHave two setups with the same issue. Disabling "HTML filter" and "HTML corrector" at CKEditor profile/Security does seem to fix it for me. Input formats remain unchanged.
Comment #26
Joran Lafleuriel CreditAttribution: Joran Lafleuriel commentedhad the same problem on drupal 6.24 since last ckeditor update 6.x-1.10
#25 suggestion fixed it for me
thanks !
Comment #27
dczepierga CreditAttribution: dczepierga commented@GoddamnNoise, really thx for your help. I found where is problem and fix it. Now our team test it - after this i would attach patch here and commit it to GIT.
When it would be ready i will write about it here, so pls be patient.
Greetings
Comment #28
GoddamnNoise CreditAttribution: GoddamnNoise commentedThank you very much, dczepierga. Thanks to michal_cksource and wwalc too for all your help.
Comment #29
dczepierga CreditAttribution: dczepierga commented@GoddamnNoise, thank you for your help to reproduce this too... Nice job!
I've attach patch for this issue. It should help. Please review it and write does it help or not.
Greetings
Comment #30
GoddamnNoise CreditAttribution: GoddamnNoise commentedHi, @dczepierga,
I've tried to apply the patch with no success. I've downloaded the CKEditor 6.x-1.10 version, I've uncompressed it, and then, i've copied the patch file to the ckeditor root folder. Then,I've tried to apply the patch, but there were errors:
I think the errors appear because in the patch file there are references to 'a' and 'b' folders which you have probably created to make the patch but which don't exist in the CKEditor 6.x-1.10 version.
Comment #31
dczepierga CreditAttribution: dczepierga commented@GoddamnNoise, try to apply patch to last DEV version... we never make patches to stable releases, we work only on DEV version.
When u want to apply patch, first of all u must checkout repository from GIT and switch to 6.x-1.x branch. After this patch should apply without any problem.
GIT when making patch always use 'a' and 'b' folders to mark paths as alias to the source and destination files.
Greetings
Comment #32
GoddamnNoise CreditAttribution: GoddamnNoise commentedHi again, @dczepierga,
Ok, i've done a checkout from the 6.x-1.x branch of the GIT repository and I've patched it using GIT. I've tested the patched version and it seems to work ok for me when the 6.x-1.9 and 6.x-1.10 versions fail (using a CKEditor's user profile with the "HTML Corrector" filter enabled as explained in previous comments).
Nice job!. Thanks a lot.
Is it planned to release a new CKEditor version soon or we better apply the patch to the 6.x-1.10 version?
Greetings.
Comment #33
dczepierga CreditAttribution: dczepierga commentedOk, so i commit this patch to GIT (diff)
Really thx for help and review.
CKEditor module will be release asap, if u want u can move patch to stable release, and u will get it after next stable release.
Greetings
Comment #34
GoddamnNoise CreditAttribution: GoddamnNoise commentedHi @dczepierga,
I'm not sure about how to move patch to stable release without breaking anything. I'll try to patch the 6.x-1.10 version to use it while the new Ckeditor patched version is not released.
Thanks a lot again, and thanks again to all the CKEditor module team. Nice Job.
Greetings
Comment #35
boazr CreditAttribution: boazr commentedSame here:
6.x-1.10 - only when removing all security filters ckeditor shows any text. With any of them checked - the text disappears as soon as the wysiwyg is rendered (switching to plain text or viewing html source does not keep the text).
Comment #36
mkesicki CreditAttribution: mkesicki commented@boazr
did you use latest DEV version or use patch attached at #29 ?
Comment #37
dczepierga CreditAttribution: dczepierga commented@boazr, look to this thread #1497184: Style changes lost after saving - it's probably this same problem which u have, pls review patch in this related issue and write there does it help or not.
I closed this issue, because reported bug is fixed.
Greetings
Comment #38
dczepierga CreditAttribution: dczepierga commentedComment #39
mkesicki CreditAttribution: mkesicki commentedComment #40
gorod1277 CreditAttribution: gorod1277 commentedGot the same issue with blank text field under editing with 6.x-1.11, D6. Removing sec filters resolve the issue, but that is not a solution, right?