4

I have strange issue with ckeditor that it loads all page source including (header, menu, body, footer ...) not the node body field itself.

the problem may have relation with default search module as it disappears when I re-index the site till the index built again.

I tried many links and that question but nothing works for me.

I tried jquery_update but didn't make any change BTW I see the body field content before the ckeditor loads after that the field content becomes all page source

CKEditor: 7.x-1.16, CKEditor Media: 7.x-1.x-dev, jQuery_update module loading jquery 1.8

I checked ajax requests and found that /ckeditor/xss returns the whole page content.

Please help me fix that issue

Answer:

The solution in my case was based on zhilevan answer solution 2

just added checking for the $view_mode like:

function my_module_node_view($node, $view_mode, $langcode){
 if ($node->type=="webform" && $view_mode != 'search_index'){
 //Do some stuff here
}

solved the issue without the need to disable the search module

Also solution 1 :Switch of "Plugin for inserting Drupal teaser and page breaks" didn't make sense and I think it have no impact here

2
  • Need more info. Any errors in your php error logs? Sep 6, 2015 at 21:27
  • Check your markup if all elements are properly closed
    – Gulok
    Sep 7, 2015 at 2:37

3 Answers 3

3
+50

I had this problem some month ago, one solution with disabling search module was good, but now i've needed search-box working, so i've made a research and found another thing.

In my case the problem was Plugin for inserting drupal teaser and page breaks. I've had this plugin switched off, but button "DrupalBreak" was added to Used button list.

solution 1:

Go to CKEditor profile settings page at '/admin/config/content/ckeditor/edit/[profile_name]'
Switch of "Plugin for inserting Drupal teaser and page breaks" in appearance settings.
Make sure, that "DrupalBreak" button is not in use.

solution 2:

The problem most likely lies within the search-module's cronjob to index the page. This cronjob kind of views the nodes it wants to index. If you use hook_node_view() anywhere in your modules and the cron-user gets an error or gets lead anywhere by a drupal_goto(), the behaviour you described is the result.
Solution: Disable the search-module if you don't need it. If you need it though, check the $view_mode in your hook_node_view()-implementations. If it says "search_index", no redirects should be made. (the easiest way is to just return $node if($view_mode == "search_index")

1
  • @Mhmdgomma you're welcome, We are here to help each other
    – Yuseferi
    Sep 8, 2015 at 4:28
1

This might help:

  • Check the version of jQuery required by your donwload of CKEditor
  • Install the jquery_update module
  • Choose a vesion of jQuery that will work with CKEditor from that module's configuration page.

    (I find 1.8 works well with most contrib modules)

1
  • 1
    I tried jquery_update but didn't make any change BTW I see the body field content before the ckeditor loads after that the field content becomes all page source Sep 7, 2015 at 5:54
1

The solution in my case was based on zhilevan answer solution 2

just added checking for the $view_mode like:

function my_module_node_view($node, $view_mode, $langcode){
 if ($node->type=="webform" && $view_mode != 'search_index'){
  //Do some stuff here
}

solved the issue without the need to disable the search module

Also solution 1 :Switch of "Plugin for inserting Drupal teaser and page breaks" didn't make sense and I think it have no impact here

1
  • 1
    Glad you got it solved. You should edit your original post so that people can find this info instead of adding an answer. Cheers - Sep 7, 2015 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.