I updated from 7.x-2.0-unstable3+46-dev to the latest, 7.x-2.0-alpha2. I know a lot has changed between those two versions, but I thought I had all of the bases covered. The only fallout I've noticed so far is that my views are slightly different. Basically, none of my views that used rewrote to make an image a link is working anymore.

I sort of doubt this is recreatable by anyone else, since it came up after the update and I know there were some view-specific changes in these updates. But here's my set up anyway:

  • An link field, excluded, displaying the plain text url.
  • A media image rendered using a custom style, re-written to "output this field as a link", and passed the url from the link field.
  • I also tried manually putting <a href="[field_link_foo]">[field_image_foo]</a> in the rewrite results, but it outputs exactly the same code.

Here's what the rendered code looks like for the views field. Notice how the anchor tag opens and closes twice before the image is even called:

<div class="views-field views-field-field-image-ad">

<div class="field-content">
<a href="http://www.mywebsite.com" class="views-ajax-processed-processed"></a>

<div id="file-4" class="file file-image file-image-jpeg">
<a href="http://www.mywebsite.com" class="views-ajax-processed-processed"></a>

<h2 class="element-invisible"><a href="http://www.mywebsite.com" class="views-ajax-processed-processed"></a><a href="/file/4" class="views-ajax-processed-processed">myfilename.jpg</a></h2>
      
<div class="content">
<img src="http://www.mywebsite.com/myfilename.jpg?itok=r-wTPMsQ" width="270" height="280" alt="" title="">  </div>

</div>
</div>
</div>

There are no theme overrides or view theme templates that I can find, but I'm tempted to create one to manually put the link how it should be. I'd love to have a more sustainable fix if anyone has ideas. Thanks in advance.

Comments

davidneedham’s picture

Issue summary: View changes

Updated issue summary.

davidneedham’s picture

Issue summary: View changes

Updated issue summary.

RedEight’s picture

Having the same issue in current dev (7.x-2.0-alpha2+8-dev). I'm trying to find a solution...
Seems to be similar to this thread: #1892218: html broken when using links
They both duplicates the link through the whole tree.

RedEight’s picture

Found a solution. Seems to be an issue in File Entity. Fix is #3 at #1858036: File entity views fields outputting as a link are broken.

bneil’s picture

Status: Active » Closed (duplicate)
bneil’s picture

Issue summary: View changes

Updated issue summary.