When editing an existing node, CKeditor appears to placing a

at the beginning of the content, thus forcing an empty teaser. Creating new content displays the break correctly. Editing the content causes the teaser to be removed.

CommentFileSizeAuthor
#7 ckeditor-2356522.patch906 bytesmephir
#5 mods.txt25.29 KB2faroffroad
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jdm34’s picture

When editing an existing node, CKeditor appears to placing a <!--break--> at the beginning of the content, thus forcing an empty teaser. Creating new content displays the break correctly. Editing the content causes the teaser to be removed.

CinemaSaville’s picture

I got this problem too. It's maddening. Any small thing you do inserts the

at the beginning, and no way to remove it.

mephir’s picture

I need more info about it, like:
Can you paste sample content, which you are editing?
What is the default state of CKEditor? Is it disabled or enabled by default?
Could you provide me a list of installed modules with their version numbers?
Maybe some javascript error occur, you can see it in Firebug, when you are using Firefox.
Last thing, check the version of CKEditor, because with versions below 3.1 breaks are not supported. You can try one of versions from there.

CinemaSaville’s picture

I'm using CKEditor 3.1. It is enabled by default. I'm editing blog entries.
I have about 85 modules installed, and it's gonna take a while to copy and paste all the names, so it might be better if you gave me an idea of which types might be influencing this behavior.

Firebug returns this message when I view the node-

onpageshow="null;event.persisted && CKEDITOR.tools.callFunction(0)">

Thanks for the help. This is a great module, this is a minor irritation, but a crucial bug fix.

2faroffroad’s picture

FileSize
25.29 KB

Same issue. If I Switch to plain text editor and save the page break is not there and the teaser works fine. But if I switch back and make no changes and save it does not work..

I can only see the --break-- for a split second while the CKEditor loads.

A copy and paste from the Module page is attached

mephir’s picture

Ok, i found the way to repeat this bug. Patch posted below.

mephir’s picture

Status: Active » Needs review
FileSize
906 bytes

Here is a patch, try it.

2faroffroad’s picture

Thanks. Patch worked great.
Just re-save with patch applied and the teasers will show.
Thanks for your help and this much better editor.
C-ya on the trail.

CinemaSaville’s picture

Status: Needs review » Fixed

Great work. Fixed.

jdm34’s picture

Wow, thanks for the quick fix!

wwalc’s picture

Status: Fixed » Reviewed & tested by the community

Changing the status of the ticket because we haven't committed it yet ;-)

wwalc’s picture

Status: Reviewed & tested by the community » Fixed

Great job, fixed in CVS.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jvieille’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev
Status: Closed (fixed) » Active

I don't know if it is the same issue
When creating a node, the teaser break is at the top of the text (empty teaser)
When trying to change the teaser position using the CKeditor button, it moves at the end of the text (teaser = full node)
The only possibillity to contro;the teaser is to drag and drop the teaser line break at the wished place - or to switch to plain text edition.
I am using the latest CKEditor and latest dev

2faroffroad’s picture

Ya, sounds like the same issue
Have you applied the patch? Apply it and see if it fixes it.
or upgrade to the stable release!
thanks.

jvieille’s picture

I was using the stable release of Jan. 14th, and then tried the more recent dev version
The issue was the same.
Shall I apply the patch on either version, meaning it is not yert committed since December 9th?

wwalc’s picture

Status: Active » Postponed (maintainer needs more info)

@jvieille - make sure you have cleared Drupal cache (if javascript compression is enabled) and your browser cache.
If that does not help, make sure that you can reproduce it when creating new nodes / editing nodes created after clearing the cache.
If yes, then please send me a PM (if possible) with a link where I can see this bug live.

jvieille’s picture

I checked again, it appears that it works perfectly in all sitations but on one specific post, the only place where I tried to move the default teaser break position...

This odd behaving post has apparently an html coding (created at some point by CKeditor) that prevents the teaser to be handled properly.
I succeeded at getting 2 versions of anti-teasing HTML and 2 versions that work:

Version 1: no teasing

<div>
  <div>this is a test (1) of HTML that is generated by CKeditor</div>
  <p>and that does not allow a correct teaser handling...</p>
</div>

Version 2: no teasing

<div>
  <p>this is a test (2) of HTML that is generated by CKeditor</p>
  <p>and that does not allow a correct teaser handling...</p>
</div>

Version 3: OK

<div>	this is a test (3) of HTML that is generated by CKeditor</div>
<div>
  <br />
  and that is teasing friendly...
</div> 

Version 4: OK

  <div>This is a test (4) of HTML that is generated by CKeditor</div>
  <div>and that is teasing friendly...</div>
wwalc’s picture

Ok I see now what's the problem - CKEditor does not allow you (at least it tries) to move teaser to a place where it will cause that invalid HTML will be used as a teaser - this is by design.

Looking at the first example:

<div>
  <div>this is a test (1) of HTML that is generated by CKeditor</div>
  <p>and that does not allow a correct teaser handling...</p>
</div>

if we put the teaser after the first line, we'll end up with:

<div>
  <div>this is a test (1) of HTML that is generated by CKeditor</div>

(note: div tag is not closed).

Theoretically CKEditor could simply break that surrounding

tag into two separate divs, but this way:
- your page design could be broken when viewing the full article (2xdiv != div)
- if div has an id attribute, creating two div tags with same (invalid), or different ID could possibly break also other things if you have css rules or custom javascript code that is relying on this id.
wwalc’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I'm closing this issue because last problem reported by jvieille is actually quite different than the original issue that has been fixed.
@jvieille - please feel free to create a new issue if you believe that the way how CKEditor is handling teaser breaks should be improved.

jvieille’s picture

I think that having raised the possible issue is enough
On one hand, it might be impossible to solve at the Drupal level
On the other hand, this seems not a frequent issue: knowing it is only a problem of handling HTML is sufficient at this point/
Hint for people confronted to the issue:
1) Copie your text in the clipboard,
2) erase totally the editing area in raw text mode
3) copie the clipbord in CKeditor as plain text
4) Format your text according your preferences and place the teaser where you wish.