Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Oct 2015 at 06:45 UTC
Updated:
24 Oct 2015 at 19:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dawehnerWhat have you chosen as input for this field? I think in general providing an export of the configured view could be really helpful.
Comment #3
heykarthikwithu"Global: Custom text" is the input field chosen, have a look at the exported view, may get an clue.
Comment #4
turegjorup commentedI'm seeing this as well after upgrading to RC1. Didn't experience the issue with beta16. Copying the core views-view-field-html.twig template to my theme and adding the raw filter eg. {{ output | raw }} fixes it.
Checking the diff for the core template between beta16 and RC1 is that {{ output }} has been changed to {{ output -}}. However removing the "-" isn't enough to fix it that requires the raw filter. So I'm thinking there must be some other change the rendering of "Custom text" in views between beta16 and RC1.
Comment #5
charlieweb82 commentedYes is correct in beta16 work fine, only in the RC1 is the issues here the view and a screenshot of the output

Comment #6
charlieweb82 commentedthe solution you mention @turegjorup is good, fix the problem and render the output I add the views-view-field-html.twig to my theme templates and add the {{ output | raw }} and the custom field render the fields in the view. but this need a fix in other version.
Comment #7
Devline commentedThe issue is also occuring since RC1, on text replacement when the field is empty. It's working fine for the primary text replacement (when the field is not empty). Fix from @turegjorup is ok for temporary workaround.
Comment #8
tannerjfco commentedThis is a regression, so I think major is appropriate.
Comment #9
dawehnerNote: We also work on the dev version, never on the RC1 itself :)
Comment #10
dalinThe offending patch appears to have been:
#2348729: Convert theme_views_view_field to twig
https://www.drupal.org/node/2348729#comment-10358601
Comment #11
dalinComment #12
dalinComment #13
samuel.mortensonI think outputting as raw is appropriate here, although it does looks weird in a core template. From what I can tell, all the output being sent to views-view-field.html.twig has already been passed through a Views field plugin's advancedRender method, which manually renders (and escapes when appropriate) fields. I'm not an expert on how this particular render pipeline works, so we'll need to review this to make sure this is not a security risk.
Comment #14
lauriii#2579427: Outputting markup from custom text field is not possible is RTBC