By hamlet on
When showing trimmed version of article, HTML appears to be break. Actually, unclosed <table> breaks design absolutly. Maybe it's possible to do more intelligent cutoff? At list show all the content up to </table> tag.
When showing trimmed version of article, HTML appears to be break. Actually, unclosed <table> breaks design absolutly. Maybe it's possible to do more intelligent cutoff? At list show all the content up to </table> tag.
Comments
it's worse when it breakes an A
It's even worse if it breakes in the middle of an A
:-(
-- NO, don't read this signature!
the function is node_teaser i
the function is node_teaser in node.module. Just a quick glance at it makes me think that it would be really easy to make it smarter about how it splits the body of the message. There are already custom breaks that try to split over a paragraph boundary.
don't forget you can always directly specify a teaser break using the <!--break--> tag.
This is a HUGE problem
The issues that result from this problem are serious, including breaking the whole design/layout of a site.
And I'm not sure how they're doing it, but drupal.org seems to be able to close chopped HTML tags in the teaser... This isn't in 4.5.1 because Democratica chokes on this stuff.
For instance, if you use this code in a new blog post w/ full HTML in 4.5.1:
a site's layout will be destroyed by the teaser, which will have unclosed div and table tags. Drupal.org somehow closes the table and div tags... how are they doing that? Will it be in 4.5.2?
Was this ever fixed?
Hey, Joe,
Was this ever fixed? I'm still seeing a similar problem...
http://civicspace.riggsveda.net
http://civicspacelabs.org/home/node/12075
I would like some guidance on this one too
I just want to say this is a problem for my site too.
Specifying the pagebreak seems to help
JohnG,
I've found that adding a
<!--break-->tag somewhere in the post, even at the end, cleans this up.I agree
Yes, more often than not, this seems to be the problem: posts get trimmed and /divs get dropped.
Confuses me every time...
e.
You might try the html corrector module
The html corrector module provides a flter that closes unclosed html tags. You can find it at http://drupal.org/project/htmlcorrector
I assumed this module was an input filter like htmltidy
Apologies for not trying it out myself (for want of documentation!) before posting a reply, but I had assumed that the html corrector module worked like htmltidy,etc, in that it cleans up html code as input from the content-textarea or equivalent.
This issue is a problem with automated output from clipping valid html... If that makes sense?
I'm not very clever at all with these things, but I can't imagine how html corrector might be used to code check at exactly the right point in the output process?
Am I imagining problems that don't exist?
Does html corrector actually solve this issue?
Filter settings
The teaser is cut off before being processed by the filter system. HTML corrector will work.
--
If you have a problem, please search before posting a question.
hang on a minute -why use "div" and "td" tags in content at all?
it's just occurred to me that really bad breaks caused by overflowing "div" and "table" tags from clipped pages is maybe a theme-use problem.
The only tables I am using in pages are generated by the CSV module thing - and they work OK in that the whole table is displayed in the node teaser - it doesn't break "[csv]" tags ... CSS is trying to move away from using tables for page layout because this causes all kinds of problems for non-visual browsers - for CSS alternatives see www.positioniseverything.net.
Off the top of my head I can't think of any other reasons for using, and therefore permitting "div" and "table" tags in node content...? Couldn't you use "span" or "p" tags to attribute CSS ids and classes? If there aren't any already, perhaps some 'theming guidelines' could make a distinction between tags allowed by node templates in the theme, and tags used in page content by users - so they don't get mixed up.
Of course if someone came up with a theme that used css classes for layout/positioning we could get rid of "div" and "table" tags from theme-html altogether and this problem would not even arise ... hmm maybe when I get some free time :)
Content some times comes from other sources
Since content may be enter by people you allow and the content may come from another source it really needs to allow an valid html if you are allowing full html. The fact is the teaser is produced simply by character count of the text and html that makes up the posting.
As for using tables, there are plenty of reasons to use them.
And as for "span" and "p" tags, they can also lose their ending tag in the teaser causing the same sorts of problems.
yes i see what you mean
so what about the full-on CCS theme template idea? that would at least resist 'corruption' from content-formatting.
but i agree, solving the clipping problem would be better.
although none of this would solve the problem completely
The stuff above about avoiding the collision of page layout tags would at least prevent the whole page from disintegrating, but it would not prevent the clipped-node-content formatting from being inavalid html (xhtml 1.0 strict) and therefore being dispalyed unpredicatbly.
I mean sorting out the "div" and "td" tag overflows would only confine errors to within the teaser-node-box.
My errors were relatively minor - unclosed "h2" tags. But, because I want pages to degrade intelligibly simple html 1.0 in "other" browsers, there's no css way round this.
Teaser trim breaking links
So we are supposed to install yet another module to fix this? Should not this be fixed in the core? I can remember to put the break in, but not all my users are so careful or astute. You end up with links like http://w, and that's not the worst case scenario by far.
This, with the lack of a ready for prime time links module is really souring me on Drupal, frankly.
yes- add your voice for a fix
A fix (or at least recognition of the problem) is being dicussed here:
http://drupal.org/node/54833
Please add you comments and suggestions to this issue to help get this problem resolved.
---
Work: BioRAFT