If no manual teaser break is inserted, when the first paragraph is more than the defined max teaser length, the teaser will be empty if the first paragraph is surrounded by <p> tags and if the initial <p> tag is on its own line in the HTML body of the page.
Problem seems to be that the line break after the initial <p> tag is being interpreted as a paragraph break (line 184 of node module) ... hence empty teaser.
Am seeing this on 2 Drupal 5.1 sites, using custom "rich text" intput format (i.e. no filtering) and also with full HTML. (I don't think filters affect this.)
Suggestion:
A line break "\n" should only be interpreted as a paragraph break if
a) the line break convertor filter is active for the node in question
b) the line break does not occur within <p> tags
Grateful if:
1) someone could confirm this behaviour
2) and my diagnosis
3) and let me know how/where I should report this as a bug/issue. I could not find an issues page for the node module ... is there one? This issue seems to be related http://drupal.org/node/155337
Ta
gpk
Comments
Confirming.
Hi. I can confirm this issue on Drupal 5.2. Your explanation seems right, too long paragraphs break teasers. I think you should report this bug against the 'core' drupal, not the 'node' module.
Agree ... in fact a couple
Agree ... in fact a couple of weeks ago I was about to do what you suggest but someone had already opened an issue/bug on this a couple of hours previously - so I confirmed the bug, only now the issue appears to have vanished ...
OK I'll add this to my to-do list ..!
gpk
----
www.gelst.com
gpk
----
www.alexoria.co.uk
Actually this has been
Actually this has been reported a number of times - see the link above and the issue it is a a duplicate of.
A workaround when using TinyMCE is to go to the raw HTML and insert
where you want the break to occur, but this might possibly lead to invalid HTML if inserted in the middle of a <p>.
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
Another alternative
Another way to handle this is to disable source formatting for TinyMCE. This will put the source onto one line rather then multiple lines. It's far messier if you edit the HTML on a regular basis but if not, it's an easier solution. If you already have existing content, just re-save the content and it should work.
We are actually working on a
We are actually working on a bugfix for this at the moment. The fix will be for D6 - if also needed for D5 please shout loud and clear and I'll see if we can backport it. You would then either need to use the latest development version of D5 (drupal-5.x-dev), or wait for D5.4, or patch your own copy of D5, for which you need a patch utility. It's actually not too difficult - see here http://drupal.org/patch/apply
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
Please Backport for 5
That would be absolutely fantastic. I'd be willing to wait for 5.4.
Thanks!
Unfortunately 5.4 is already
Unfortunately 5.4 is already out!!!
Pls set the status of the issue to "Patch (to be ported)" if you want this in any 5.5 release.
Also if you could test the patch and report your findings to the issue that would make it more likely that we get the patch committed.
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
Bug also confirmed for version 6.15!!
The exact same behaviour still applies to version 6.15!!
The effect is simply reproduced by following the steps described.
I ran into the problem creating a new content type "blog posts".
Newly entered blog posts are promoted to the frontpage, and there they show up without the teaser.
Debugging shows that the teaser is written as an empty paragraph HTML tag (
<P>), when:a. no manual inserted teaser break (
<!--break-->) is present;b. AND the first paragraph is enclosed in HTML
<P>tags;c. AND the opening HTML
<P>tag is on a line by it's own;d. AND the first paragraph is longer than the configured maximum teaser length.
I would certainly value a patch for this.
Septimus
...
Please create a new issue (in the post-installation forum) or issue that deals with the 6.15 version.
~silverwing
I suspect that the
I suspect that the content/page in question is using an input format that includes the line break convertor. Maybe you can remove that filter from the input format? That should fix your problem. Or maybe create another input format, without it. Or use a manual
<!--break-->tag.Ideally the teaser splitter algorithm would be a bit more clever about interpreting newlines as potential break points, or not; whether anyone has the urge to code this I wouldn't like to guess ;)
gpk
----
www.alexoria.co.uk
Bug solution for 6.17
I just spent my morning dealing with a similar problem using D6.17. I found out the major issue was the opening
tag being on its own line. The solution I found was (I'm using CKEditor for the blog entries) in the CKEditor config, under "Cleanup and Output" change Use Custom Format Options to "Yes" and deselect "break line after the opener tag." It solved it for me.
Hoping for a fix soon...
>Hoping for a fix soon... The
>Hoping for a fix soon...
The fix is to remove the line break filter from the relevant input format(s). If you are using CKeditor then you shouldn't need it.
gpk
----
www.alexoria.co.uk