User login

Views creating blank rows? Check your node type filtering

The 'Items to Display' in Views is set to 10. The number of blank lines that show are the difference between the limit in Views and the actual number of items in the table. So in this example, there are 7 extra blank lines (odd/even coloring) in Firefox -- there are no extra blank lines in IE.

Agaric wrote:

First of all look at the source code in both browsers and you'll see that's the same, and it might tell you more about what the extra lines are.

Probably something mentioned in merlinofchaos' first response is in fact your issue– make sure you are filtering by node type. If your view is showing CCK fields, you will of course only get visible output for nodes with data in those fields– but if your view isn't filtered by the node type(s) that has those fields, you will have "invisible" results for other nodes that don't have those fields at all.

Success!

Your suggestion of inadequate filtering was spot on.

Once I added that as another filter, it cleared up the extra lines.

Resolution

Searched words: 
Views blank lines, empty rows, extra rows malformed tables, extra row at the beginning verified that the code generated does indeed generate excess entries. I've gone back and researched browser (IE and Firefox) table degradation regarding empty cells and rows

Comments

View still contains empty items

I am using your filter suggestion, but still am having a problem with empty results. (I'm using the view to create results to show inside a jcarousel block.) I'm getting around the problem currently by changing the fixed width settings to "auto" in the .css code, but a better solution would be to eliminate the empty html elements altogether. In other words, empty list items are being created, with

<

div> elements inside them like the others, but no images.

I have multiple imagefield fields allowed--but not required--on several different content types. The view is supposed to show the latest 10 images, no matter which content type they're part of. Some content nodes end up having multiple images, some none. I guess for the ones with none, the view is still creating a list item for them. I have just started using Views, so not sure how I can set up a validation step to make sure the content is "not empty" or something, before it gets included in results...

Any help is appreciated. THANKS!

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.