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.
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.
Comment | File | Size | Author |
---|---|---|---|
#7 | ckeditor-2356522.patch | 906 bytes | mephir |
#5 | mods.txt | 25.29 KB | 2faroffroad |
Comments
Comment #1
jdm34 CreditAttribution: jdm34 commentedWhen 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.Comment #2
CinemaSaville CreditAttribution: CinemaSaville commentedI got this problem too. It's maddening. Any small thing you do inserts the
at the beginning, and no way to remove it.
Comment #3
mephir CreditAttribution: mephir commentedI 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.
Comment #4
CinemaSaville CreditAttribution: CinemaSaville commentedI'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.
Comment #5
2faroffroad CreditAttribution: 2faroffroad commentedSame 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
Comment #6
mephir CreditAttribution: mephir commentedOk, i found the way to repeat this bug. Patch posted below.
Comment #7
mephir CreditAttribution: mephir commentedHere is a patch, try it.
Comment #8
2faroffroad CreditAttribution: 2faroffroad commentedThanks. 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.
Comment #9
CinemaSaville CreditAttribution: CinemaSaville commentedGreat work. Fixed.
Comment #10
jdm34 CreditAttribution: jdm34 commentedWow, thanks for the quick fix!
Comment #11
wwalc CreditAttribution: wwalc commentedChanging the status of the ticket because we haven't committed it yet ;-)
Comment #12
wwalc CreditAttribution: wwalc commentedGreat job, fixed in CVS.
Comment #14
jvieille CreditAttribution: jvieille commentedI 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
Comment #15
2faroffroad CreditAttribution: 2faroffroad commentedYa, 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.
Comment #16
jvieille CreditAttribution: jvieille commentedI 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?
Comment #17
wwalc CreditAttribution: wwalc commented@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.
Comment #18
jvieille CreditAttribution: jvieille commentedI 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
Version 2: no teasing
Version 3: OK
Version 4: OK
Comment #19
wwalc CreditAttribution: wwalc commentedOk 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:
if we put the teaser after the first line, we'll end up with:
(note: div tag is not closed).
Theoretically CKEditor could simply break that surrounding
- 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.
Comment #20
wwalc CreditAttribution: wwalc commentedI'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.
Comment #21
jvieille CreditAttribution: jvieille commentedI 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.