Since Fckeditor has a new releas called "Ckeditor" I tried to install it and use it. This works fine, except when the "AJAX-Comments" Modul is enabled. Anybody having the same problem?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

elaman’s picture

Category: support » bug
Priority: Normal » Critical

Same problem. Subscribe

elaman’s picture

Priority: Critical » Normal
Status: Active » Needs review
FileSize
692 bytes

Patch to fix this problem. Worked with CKEditor 3.3...

fortis’s picture

Peritus, выдает "Поле Комментарий обязательно для заполнения."

elaman’s picture

Вот эта работает вроде....

palmaross’s picture

Да, работает, проверил на CKEditor 6.x-1.1

но после добавления комментария следующие комментарии или ответы обязательно содержат текст этого добавленного комментария. Зачем он его "запоминает"?

palmaross’s picture

еще попроверял и вот что вылазит:

если ответил раз, то следующие разы уже не ажаксит - перенаправляет на новую страницу "Ответить на комментарий". То есть на одной странице можно только раз ответить ажакс-способом. Печально.

"изменить" почему-то не хочет грузить редактор, всегда выдает просто текстовую область (со всеми потрохами HTML естественно). Тоже печально.

после того как все же изменишь (комментарий) - "ответить" уже не ажаксит.

Короче, с CKEditor надо поработать этому модулю. А так модуль замечательный.

elaman’s picture

Ххм, странно. Но у меня работает с патчем.

palmaross’s picture

а у тебя какой Ckeditor? может дело в версии? (Пред-предыдущий комментарий убрал - дело в кеше было).
Проверил уже кучу раз - все время кеш подчищал -

после ответа на комментарий больше не ажаксит.
"Изменить" ни за что не хочет грузить редактор - выдает текстовую область.

насчет "изменить" такая есть разница:

при "Новый комментарий" и при "Ответить" поле редактора такое:
mapgallery_page@node/20.edit-comment

а при "изменить" поле уже такое:
ajax_comments/js_reload/20/13/cid.edit-comment

то есть в первых двух случаях редактор берет комментарий из ноды, а в последнем - из модуля. Так получается?

Ckeditor 6.x - 1.1

darthf1’s picture

please comment in english?

darthf1’s picture

Status: Needs review » Needs work

I tried both patches, they both dont work

alisamar’s picture

Same problem. Subscribe

Roavei’s picture

@Peritus - any updates on this?

Roavei’s picture

Version: 6.x-1.x-dev » 6.x-1.4
Component: User interface » Miscellaneous

Update
Tested the newest Ckeditor (3.4.1) and the newest Realease of this Module (6.x-1.x-dev).
I discovered two things:

1. You're not able to click into the Ckeditor. Even if you click into it - it doesn't get the focus.
But if you Click on the "Source" Button, you will be able to write and use the Ckeditor normally.
So however the Click on the Source-Button can put the focus on Ckeditor - we need to do it every time Ckeditor loads itself.

2. If you click Submit. You get the following warning: "Comment field is required."
Therefore it seems like the text of the Ckeditor is not sent proberly to the normal formular.

Roavei’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Component: Miscellaneous » User interface
Roavei’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Component: Miscellaneous » User interface
FileSize
479 bytes

Just tried some things and finally got the solution.
I updated the patch of Peritus and it's working fine for me

Please review and test.

Roavei’s picture

Status: Needs work » Needs review
DontBlink’s picture

The patch does not work for me

Roavei’s picture

Could you provide some more information.
Which versions of the modules are you using?
What's the error?

DontBlink’s picture

just like nothing happend... i dont realy know where i have to put this file, at the moudle directory?
i got the same message when i`m trying to send a comment: "Name field is required."

Roavei’s picture

Hm. This is a patch. This means it is designed to add or delete a few lines of code in an existing file.
The file is located hat sites/all/modules/ajax_comments/ajax_comments.js

Somewhere arounf line 730 you should find the text: "// Update FCKeditor."
Above this text you have to insert this code:

//Update Ckeditor
if (typeof(CKEDITOR) != 'undefined') {
   Drupal.ckeditorOff('edit-comment');
   Drupal.ckeditorOn("edit-comment");
}
DontBlink’s picture

not working, same problem, but, when i click again on the "post", get the "Name field is required.",and click on it again, the comment is sent...

Fidelix’s picture

I can confirm what catooly said, however, no matter how many times i click "Save", the comment isnt posted.

I tried the three patches available on this issue.
I'm using WYSIWYG with CKEditor.

Roavei’s picture

@Fidelix the patch is working for me using the Drupal-Modul "Ckeditor" and not the WYSIWYG-Editor.
Seems like there has to be done some additional work regarding to the WYSIWYG-Editor Modul.

rjbrown99’s picture

I rolled the existing patch for #15 this into -dev tonight. I'm not using CKEditor so I can't tell you if it works or not. Can you please migrate to the latest -dev when it is re-rolled and let me know if this at least fixes the CKEditor module integration issue? Thanks.

http://drupal.org/cvs?commit=441044

dddave’s picture

Status: Needs review » Needs work
FileSize
40.59 KB

Half way there. ;)

CKE works flawlessly on initial writing of a comment (given that you correctly configured wysiwyg and input formats).

Problem: If I want to edit a comment it completly breaks (see attached pic).

I get the following error in firebug: uncaught exception: [CKEDITOR.editor] The instance "edit-comment" already exists.

rjbrown99’s picture

Hmm. The patch in #4 actually addresses this via the three functions (remove, attach, update) while the patch in #15 which I committed only handles update. Would you mind looking at #4 and adding those lines into the remove and attach functions and see if it helps?

dddave’s picture

Of course I wouldn't mind...but I am not quite sure what to do. I am basically a non coder (playing around now and then) and I am much more comfortable applying something than "writing" it.

Anyways I am out for tonight (2:30 here in Germany) but I'll try to chime back in soon. Thanks for the movement you provide to this module btw.

rjbrown99’s picture

#27 - in lieu of a new patch, have a look at the file in #4. It's a patch for the file ajax_comments.js. The lines starting with @@ tell you the function name that the code block belongs to. In this case, ajax_comments_remove_editors() is the first, ajax_comments_attach_editors() is the second, and ajax_comments_update_editors() is the third.

Basically you want to find those functions in the JS file, and then just plop in the new code (as designated with the + sign in the patch, just without the +). So basically you wind up with adding the following code to ajax_comments_remove_editors(), and a similar one for the lines relating to ajax_comments_attach_editors().

  // Update CKEditor 3.x
  if (typeof(CKEDITOR) != 'undefined') {
    Drupal.ckeditorOff('edit-comment');
  }

If you can't get it going let me know and I'll roll a patch against -dev. By now it would have taken me less time to do that than write this post :)

dddave’s picture

Thanks for the tutorial. ;) This was pretty easy AND it did work. CKE is functional on edit now. Previewing an edited comment is also working flawlessly.
So I recommend rolling a new patch.

(btw: Is it only me or is the "blinking" feature dead since the last dev?)

edit: I am using CKE with wysiwyg. Just for the record.

Fidelix’s picture

rjbrown99, can you provide a patch?
I managed to apply this but i think some will not. Unfortunately i dont know how to create one. (Yes, i do have to learn this)

EDIT:
Observation, i'm using WYSIWYG with CKEditor. And the error message: "The filed is required." still appears.

So i can take that it still does not work.

rjbrown99’s picture

So it's working for both of you? If so I'll commit it to -dev today.

dddave’s picture

+1 for a new dev

This is working very well on my test sites but I guess it makes testing easier when people can simply check out a new dev.

Fidelix’s picture

dddave, rjbrown99, i did test the dev version.

And i did tried applying all modifications. However, i still get the message "The filed is required."

rjbrown99’s picture

FileSize
1.43 KB

OK let's do this the right way and start with a patch since I can't test this myself. Here's a patch against -dev with the additional changes from #4. Please let me know if this is good and I'll roll it in to -dev as a commit.

Fidelix’s picture

I patched this on: projects/ajax_comments-6.x-1.x-dev.tar.gz

I simply get "The field is required".
You may test it yourself here:

http://dev.anbient.net/tv/akagi

If you want, i can provide admin access to my dev site.

dddave’s picture

Patch applied nicely but when I tried everything ajax_comment related was broken (even the input format link wasn't clickable), no blinking etc.
Solution: Delete all profiles in the wysiwyg settings and reassign CKE to your input formats.

Results: When no profile has CKE assigned ajax_comments works perfectly. Assigning CKE only to one format (here: Full html) breaks ajax_comments even if the default format is filtered_html (i.e. you have to change the input format manually when you edit/write a comment). Posting a new comment redirects to a new page instead of the ajaxy comment form.
Editing a comment seems to work fine on the first try (CKE editor loads fine and seems to work. However previewing is broken and upon save NO changes are applied. Trying to edit again completely breaks and results exactly in a situation like I described in #25.

Assigning CKE to filtered and full html produces basically the same mess. Only differences is that comment editing breaks immediately and not on the second try.

This seems pretty random to me because I had it working fine when I applied the changes manually.

edit: Tested wit FF and Chrome.

Equinger’s picture

subscribing

jcisio’s picture

FileSize
26.03 KB

Patch #34 was committed. But there are a few problem:

1.

if (typeof(CKEDITOR) != 'undefined') {
  Drupal.ckeditorOff('edit-comment');
  Drupal.ckeditorOn("edit-comment");
}

It is not always correct. The comment form might neither accept CKEditor nor be enable by default. We can copy things from ckeditor.utils.js, at least to check CKEDITOR.instances and Drupal.settings.ckeditor.settings.

2. I don't know if there is any relation with CKEditor, but even I use the latest CVS of this module, without CKEditor module enable, I still have it: after submission, the comment form does not appear. Screenshot attached.

Fidelix’s picture

Why was this patch commited?

It still does not work as I and dddave stated.

jcisio’s picture

I was a little wrong. That patch was not committed. But a modified patch (or, 1/3 of that patch) was committed in http://drupal.org/cvs?commit=441044

rjbrown99’s picture

There were a few positive replies earlier in the thread so it was committed to the -dev branch. This is specifically why I haven't talked with neochief yet about a stable 1.9 version - I'd like to make sure any of the issues that have been fixed really are fixed. So if it doesn't work, there are two options - 1) revert it, or 2) fix it. In terms of a fix it would be very helpful if any of you who are using this module with CKeditor could submit a working patch for it.

jcisio’s picture

Is there anyone working on this? Do you have the 2nd problem described in #32, rjbrown99? Will revert the commit #441044 fix this problem?

I think we need to fix the problem #32.2 first, then we can move this issue to ckeditor.module ;-)

rjbrown99’s picture

I am not working on this as I have no need for it. I was trying to facilitate application of the patches that were reported to work.

I'd like to suggest that a developer with the need for this functionality review this issue, create a patch that is known to be working (against -dev), and then let's get a few people to test it.

jcisio’s picture

Title: Ckeditor » Support for CKEditor
Component: User interface » Code
Assigned: Unassigned » jcisio

For the problem I have, I've created a separated issue #1031248: AJAX Comment: comment form does not reappear after submission. I don't know why it happens and if it is just me. But I don't think it is related to that commit.

I'll work on this issue.

jcisio’s picture

Assigned: jcisio » Unassigned
Category: bug » feature
Status: Needs work » Needs review
FileSize
3.51 KB

Finally I got time to work on this. Please review this patch. There were many logical issue in ajax_comments.js and all of them are fixed! Tested with ckeditor.module 6.x-1.x-dev and CKEditor 3.5, in the following modes:
- CKEditor disable by default, comment form show by default
- CKEditor disable by default, comment form hide by default
- CKEditor enable by default, comment form show by default
- CKEditor enable by default, comment form hide by default: not work, problem with the editor and can't be fixed here (I'll work on this later, but ATM just don't use this mode)

I didn't test with wysiwyg.module, but I think this patch fixes #394668: Add support for Wysiwyg module, too.

rjbrown99’s picture

Rock on jcisio! I'd love for some feedback from folks - please give this a go and let us know if it works for you. It seems these are two of the most requested enhancements - right up there with panels support.

dddave’s picture

I could only test it with ckeditor in a wysiwyg set-up:

Initial commenting works flawlessly. Nice!

Not working: Editing of a comment (shows only subject field and bot comment body) and disabling rich-text and then reenabling (constant loading but nothing happens).

jcisio’s picture

Noone else testing on this one? I just test a few times again and it still works ;)

dddave, if it works with wysiwyg module, it is not my intention. I just fixed some obvious error, but didn't look into the logic.

rjbrown99, since the last commit was already broken, could you test this one and commit any way? It gives place for other patches (when we are still on CVS...)

rjbrown99’s picture

I'm open to committing to -dev, sure. I won't be able to get to it until this weekend, so in the meantime if anyone else in this huge thread could test that would be helpful. Otherwise I'll roll it up this weekend.

zazinteractive’s picture

jcisio's patch works for me

rjbrown99’s picture

Status: Needs review » Reviewed & tested by the community

OK let's call this RTBC then. I spent a few hours recompiling git last night, now I just need to get it set up and a workflow for drupal.org :)

Chad_Dupuis’s picture

subscribe

jcisio’s picture

It has been RTBC since 3 months (or 4, from the date I submitted the patch ;-)). Could anyone please commit the patch?

dddave’s picture

Yes please!

ZPRaven’s picture

CKEditor 3.6.1 отображается некорректно. То есть нет возможности ввести текст, пока не заменишь его на простой текстовый редактор и обратно.

dddave’s picture

Translation: "CKEditor 3.6.1 does not work correctly. That is not possible to enter text, while not replace it with a simple text editor, and vice versa."

@#56 Please post in English!

savioret’s picture

Hi,

I think all of you may be interested in a new patch that I posted, based on the patch of jcisio.

Here is the patch:
#1267214: Patch with several bugfixes

Dubber Dan’s picture

Subscribing as getting the same problem of it sitting there with an activity scroll bar after pressing Save. This is even after excluding ckeditor on all comment fields

nikkubhai’s picture

Please commit

  • rjbrown99 committed d674cb9 on 8.x-1.x
    #784504 by Roavei: Add support for CKEditor module
    
    
formatC'vt’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (won't fix)

at this time it is work out of the box with CKEditor

formatC'vt’s picture

Status: Closed (won't fix) » Reviewed & tested by the community

oops, i don't know about D6 version, may be not

qzmenko’s picture

Status: Reviewed & tested by the community » Closed (outdated)

Issue is closed because 6.x version is unsupported. Feel free to open new issue for 7.x or 8.x versions of module.