Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.5
Component:
user data
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 May 2009 at 20:21 UTC
Updated:
26 Oct 2009 at 11:38 UTC
if "Trim this field to a maximum length" is checked and so is "Link this field to its user", the entire output link html is chopped down to the num of chars, not just the text.
Causes field to not display at all or with broken html.
I outsmarted it by using "Output this field as a link" with tokens instead. ( "user/[name]").
Probably just the wrong order of filters.
Comments
Comment #1
dsms commentedI second that!
this bug also appears if one checked "Rewrite the output of this field" and wrapped the content with an html-tag as it is especially suggested: "You may include HTML."
the closing html-tag is trimmed away.
Comment #2
bdwelle commented+1
I just ran across this issue myself, and would love to get it fixed.
The code is in modules/views/handlers/views_handler_field.inc -> render_trim_text() , which itself calls _filter_htmlcorrector() to try to close tags, but that doesn't seem to be working properly.
Comment #3
merlinofchaos commentedThe problem here is that when you link a field to its user, it goes through theme('username') to make sure that the viewing user has the access to visit a user profile. That means the link HTML has already been added by the time it comes time to trim. Therefore, the workaround you used is the only way to actually 'fix' this.
Comment #4
halloffame commenteddsms, you found any solution there? I'm experiencing the same problem. merlinofchaos said it isn't a bug and can't be fix. I need to wrap some html tag around that field. How will I be able to do this when it is being stripped? Waaa!
Comment #5
dsms commentedI think the only chance you have is to create a particular template file for this field and put your html into that.
I suppose the base to start would be views-view-field.tpl.php, just check out the "Theme: Information" in your
view.
Good Luck :)