I have created a new content type witch has a image and a link to a site (external link).
I have created a block in views added the link field and image field. The link is OK the image I have tried to rewrite output and link the image to the external site.
If I enable external server URL the link is broken (http://%7B%7B%20field_link_site_sponsor%20%7D%7D/), if I disable external server it link's internally (http://system.com.ro/http%3A//www.bo-studio.ro; system is test domain bo-studio is the domain I want to link to).
I link using replacement pattern ({{ field_link_site_sponsor }})

Comments

yang_system created an issue. See original summary.

bkudrle’s picture

I am having a similar issue. In my Drupal 7 site, to have an external URL in views, I was able to do the following under Rewrite Results for a given field:

* Select 'Output this field as a link'
* Use the [Replace Pattern] value in the Link Path field
* Click the 'External server URL' checkbox
* In my case, I also filled the Target field with '_blank'

Note that the Replacement Pattern in my Drupal 7 application did not use the http:// or https:// in the value (i.e., only strings like 'www.google.com'). That worked fine for opening other websites when the user clicked on the link.

For version 8.0.0, now I seem to have to do the following to get this to work in a similar way.

* Select 'Output this field as a link'
* For the Link Path field, I now need to put 'http://{{Replacement Pattern}}
* In this case, I also filled the Target field with '_blank'

Note that if I select the 'External server URL', the Replacement Pattern is not replaced, as yang_system noted in the original post. I suppose this is workable, but I am wondering why the 'External server URL' checkbox is even there anymore, especially since it seems to over-ride the Replace Patterns.

Lendude’s picture

Project: Views (for Drupal 7) » Drupal core
Version: 8.x-3.x-dev » 8.0.x-dev
Component: Views Form » views.module
Status: Active » Closed (duplicate)
Issue tags: -views integration, -Drupal 8.x, -rewrite output

moving to the right queue and closing as duplicate for #2488540: Rewrite external links in views fields