Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2009 at 18:49 UTC
Updated:
7 Dec 2009 at 16:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
jastraat commentedMy comment above sadly interpreted some of my text as HTML tags. To clarify,
"$field->inline_html is appropriately being set to 'span' tags for my inline fields, but the $field->element_type is being set to a 'div' tag which results in a div tag within a span tag"
Comment #2
merlinofchaos commentedWhich fields are in use matter here, as the field handler is ultimately responsible for making the decision as to whether or not the output is inline or block. If the fields that are doing this are not core Drupal fields, then you need to file this against the module providing those fields.
Comment #3
jastraat commentedIt's happening in unformatted views with the 'fields' row style. I've observed the problem specifically affecting node reference fields, so I'll take a look at the new changes in the cck module.
Comment #4
jastraat commentedSo - this is specific to multi-value fields. CCK made a change in May to fix invalid XHTML related to this issue:
http://drupal.org/node/369364
Unfortunately, that just moves the problem. Now, if two fields are displaying 'inline' in a view but one of them is potentially multi-value, there's still a div within a span. The div is generated by CCK, and the span is generated by views. I've posted an issue for CCK here: http://drupal.org/node/494704
Comment #5
esmerel commentedNo update for more than 30 days.
Comment #6
nhck commentedI followed the discussion at #369364: field with multiple values, not marking itself properly as block level element for views integration? and realized that h views/modules/user/views_handler_field_user_picture.inc needs to be patched to return a correct element type, because
views_handler_field_user_picture::render() will return theme('user_picture', $account) - which is a block level element (div). So wrapping it inside a span is incorrect, but the parent class function views_handler_field::element_type() returns 'span' by default.
Comment #7
nhck commentedComment #8
merlinofchaos commentedI agree, that element type was wrong. Committed to all branches. Thanks.
Comment #10
oksid commentedWhat about to set default elemnt to div and when neede seting the display property in css to inline ?