Hi all,

I don't know if this is a common problem or not, but CKeditor doesn't seem to appear in header and footer areas. The only I see is a plain text areabox. Even If try to include the textarea location in the CKeditor config. I still doesn't seem to work. In all other places CKeditor works like a charm :-)

I'm using currently Drupal 6.22 - CKeditor 6.x-1.6 / the inputformat for the header is set to "Full HTML"

Any suggestions anyone.
Kind Regards
Benny

Comments

Assigned:Unassigned» mkesicki
Status:Active» Needs review
StatusFileSize
new9.56 KB

Please check attached patch. Remember that on default installation in CKEditor "Global Profile" in "Visibility settings" tab there is something like "admin/build/views*" in exclude list. Please check patch with mentioned entry and without it. Of course when this entry is there, CKEditor should not be in Views textarea.

I added second patch.

I commit changes to git. Please check latest DEV version.

Hello Michal,

Thanks for this ... I checked the exclude list and can't find any /views entries in the list.
Below a list of all the entries that are in the exclude list.

admin/user/settings.edit-user-mail-*
*.edit-pages
*.edit-pathauto-ignore-words
*.edit-recipients
*.edit-reply
*.edit-description
*.edit-synonyms
*.edit-img-assist-textareas
*.edit-img-assist-paths
*.edit-nodewords-description
*.edit-nodewords-description-value
admin/content/nodewords/global*
*.edit-relatedlinks-fieldset-relatedlinks
*.edit-allowed-values-php
*.edit-allowed-values
*.edit-update-notify-emails
*.edit-googleanalytics-*
*.edit-piwik-*
*.edit-feedburner-useragents
*@*.edit-webform-*
webform@*.edit-extra-items
admin/*/logintoboggan
admin/settings/actions/configure/*
*.edit-target
*.edit-wysiwyg-filter-*

I will try the patch and let you know A.S.A.P.

PS. Just one question - should I install both patches (on top of each other) ?

Kind Regards,
Benny

Please test install latest DEV version as described here: http://drupal.org/node/1288664#comment-5053656
This DEV contains patches.

Title:[D6] CKeditor is not working in Views header and footer text areasCKeditor is not working in Views header and footer text areas

That has not solved the problem.

1) Go to views

2) Create a view

3) Add a Global Text to the view (Header, Footer, Empty, either one)

4) Enter some text (usually we don't get the editor when inserting)

5) Click Update to save the Global Text changes

6) Click on the Global Text entry

7) CKEditor appears this time

8) Add to the text or something

9) Click on Update

10) Come back: notice that the text is empty, gone, wiped out

11) Enter the corresponding path in the CKEditor

*/header/text.edit-options-content*
*/footer/text.edit-options-content*
*/empty/text.edit-options-content*

so the editor doesn't appear since it creates problems, removing it is a good solution, right?

12) Come back to the view, edit the Global Text you added

13) The CKEditor appears (eventually you need to test twice)

Note that I would prefer if it were to work, but either way, both capabilities should work, or at least not get the editor until getting the editor works when clicking Update.

Okay, for now I commented out the patching in ckeditor_init() since it doesn't work at all for me.

<?php
function ckeditor_init() {
 
drupal_add_css(drupal_get_path('module', 'ckeditor') .'/ckeditor.css');
 
// Added for support [#1288664] Views
  //if (module_exists('views') && preg_match('/admin\/build\/views/', $_GET['q']))
  //{
  //  $module_drupal_path = drupal_get_path('module', 'ckeditor');
  //  $editor_local_path  = ckeditor_path(TRUE);
  //  drupal_add_js($editor_local_path . '/ckeditor.js?I', 'module', 'footer', FALSE, TRUE, FALSE);
  //  drupal_add_js($module_drupal_path .'/includes/ckeditor.utils.js', 'module', 'footer' );
  //  drupal_add_js(array('ckeditor' => array('settings' =>array('edit-footer','edit-header'))), 'setting');
  //}
}
?>

Thank you.
Alexis Wilke

Title:CKeditor is not working in Views header and footer text areas[D6] CKeditor is not working in Views header and footer text areas
Status:Needs review» Needs work

Changing title as usual

Title:CKeditor is not working in Views header and footer text areas[D6] CKeditor is not working in Views header and footer text areas

I commited changes to GIT.
@AlexisWilke changes in ckeditor_init function are not all changes to this ticket. Another are in ckeditor.utils.js file.

michal,

Speaking of that, why the ?I in

'/ckeditor.js?I'

Usually, Core adds that for you!

Thank you.
Alexis

P.S. I'll be testing all those changes at a later time and report accordingly.

Drupal add this to css and js files. This is normal in drupal. This is related with cache I think.

michal,

We agree, so why it is in the source of ckeditor?

Thank you.
Alexis

I commited fix to GIT. Thanks for notice this.

Status:Needs work» Fixed

Ok i make some changes and now everything seems to work.
I commit all changes to GIT.

If u found any more bugs, pls create new issue and report it there.

Greetings

Status:Fixed» Closed (fixed)

Version:6.x-1.6» 6.x-1.8
Status:Closed (fixed)» Active

I have tried this and this is not working for me at all. I am not sure what to do anymore. I am trying to do this with a Views Header and excluding this too didn't work either.

Status:Active» Closed (fixed)

@ShawnRisk please don't reopen closed tickets especially when there is such request like:
http://drupal.org/node/1288664#comment-5168928

Priority:Normal» Critical
Status:Closed (fixed)» Active
StatusFileSize
new40.84 KB

Hi.

This is not working for me either, I am using CKEditor 1.8 and the latest version of Views. The full ckeditor is displayed in the Views Empty Text Global Text Area and will not save any text written. I have tried adding the exclude paths in their raw form and using wildcards, but none work.

I have included a screenshot showing the editor displayed in these text areas.

Priority:Critical» Normal
Status:Active» Closed (fixed)

@moosh101
Please try use latest DEV version, it contains fixes to this issue.
Second don't reopen closed tickets (http://drupal.org/node/1288664#comment-5353120 & http://drupal.org/node/1288664#comment-5168928).

Status:Closed (fixed)» Active

Not: I did not check whether it is working or not, but there is one thing that "looks wrong" and most probably is wrong.

"admin/ckeditor/get_settings'' is called by jQuery along with the following attributes:
{'id': imagefield_id, 'url': url, 'token': Drupal.settings.ckeditor.ajaxToken}

Now, when opening the ckeditor_get_settings() function in ckeditor.module, we can find code like:

<?php
if (empty($_POST['id'])
?>

<?php
echo  json_encode($_SESSION['cke_get_settings'][$_POST['id']]);
?>

so basically, $_POST['id'] is used, BUT, and here is my concern, in one line there is:
<?php
$profile
= ckeditor_user_get_profile($user, $_POST['#id']);
?>

$_POST['#id'] ???

Hi michal_cksource,

Note that it is quite customary to reopen the same issue when it still doesn't work.

Actually, in most cases the author is expected to wait until the users say that it works for them instead of closing the issue before a "real fix" is found. 8-)

I now have tested the latest from earlier today and the editor works, but the content is still not saved. It is as if the CKeditor could not copy of the content of its textarea to the main textarea before the Views grab the content and their JS posts it to the server.

At this point I re-applied my "patch" as in #6 so I can still edit the header and footer of my views.

Thank you.
Alexis

Still not working for me. I have installed latest Views & CKEditor dev release. The editor only save text to the view in plain text mode. It wont save or update text in full-html mode.

Status:Active» Needs review
StatusFileSize
new4.72 KB

I make next patch for this bug...

Before attach this patch pls update to last DEV version - it's needed, because there was more bugs with ajax calls which are fixed now.
After do this include/exclude option should start to work. I also try to remove exclude from Views fields in "Global Profile" and for me everything start to work without problem.

So pls review this patch and write does it help or not.

Greetings

I installed the latest dev module and applied the patch and IT WORKS :) Thanks

@AshleyBoardman, one more thing: Could you try to remove admin/build/views* from Global Profile exclude list and check does CKEditor work without problem for this fields?

Greetings

I already had admin/build/views* removed from Global Profile exclude list. What I did find is that you have to change the input format to plain text and then insert the html code for it to work. Took a while to work out but I eventually got it.

We found some cases in which this patch not help and CKEditor not work correctly.

I've attach new version of patch. Patch is created from last DEV version on GIT version, so if someone apply last patch pls rebase to last DEV version of GIT and use this patch.

Pls review this patch and write does it work or not.

Greetings

Version:6.x-1.8» 6.x-1.11

I tried today with 1.11 and it is still not working for me.

Have you tried with Views 3.x? Or just 2.x? I have 3.x only.

Thank you.
Alexis Wilke

@AlexisWilke last fixes was for 2.x only.

michal,

As I upgraded I looked at the code and could see changes to the handling of views but not enough, I guess, to fix the "real" problem. It's not too important to me to have that one as a WYSIWYG so no biggie.

My change in #6 still applies just fine to avoid such problems.

Thank you.
Alexis

The footer suggests using the exclude element:
admin/build/views/ajax/display/mypagename/footer.edit-footer.
This did not work.

I tried changing the exclude element to:
admin/build/views/*
This did not work

I tried changing the exclude element to:
admin/build/views*
This worked!

Hi
I had a similar problem:
admin/build/views/ajax/display/mypagename/footer.edit-footer -> did not work
admin/build/views* -> did not work
but...
*admin/build/views* -> works

It seems the asterix in front of the path or field name is required if not using the full path.

Tilo's solution is indeed needed to solve the problem.
(I use the latest version of CKEditor module and library as of now.)

hi your patch doesn't work with the latest dev version…

patching file ckeditor.module
Hunk #1 FAILED at 360.
Hunk #2 FAILED at 441.
Hunk #3 FAILED at 450.
Hunk #4 FAILED at 495.
Hunk #5 FAILED at 611.
Hunk #6 FAILED at 1084.
Hunk #7 FAILED at 1364.
7 out of 7 hunks FAILED -- saving rejects to file ckeditor.module.rej
patching file includes/ckeditor.utils.js
Hunk #1 FAILED at 396.
Hunk #2 FAILED at 436.
2 out of 2 hunks FAILED -- saving rejects to file includes/ckeditor.utils.js.rej

Status:Needs review» Needs work

Setting status accordingly.

@OrinocoDelta - would you try to recreate the patch and let me know if it worked properly?