The files views-view-fields--search-database-results.tpl and views-view-fields--search-solr-results.tpl.php contain <h3><?php print $title; ?></h3>. However, panopoly_search already adds <h3> tags round the title [1], resulting in invalid markup like <h3><h3 class="field-content"><a href="http://localhost">Test Content</a></h3></h3>

[1]: http://cgit.drupalcode.org/panopoly_search/tree/panopoly_search.views_de...

CommentFileSizeAuthor
#5 2852563-oa_search-extratags-5.patch1.11 KBJorrit
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jorrit created an issue. See original summary.

Argus’s picture

Great find, could you add a patch?

Jorrit’s picture

Sure. What kind of solution do you prefer? Just removing the <h3> from the template or adding a condition to check if the $title var already contains a header tag?

Argus’s picture

The last option looks more bulletproof, but both are fine imho.

Jorrit’s picture

In the end I chose the simple way because the code needed to properly determine if $title already contains a tag would be too much effort for a situation like, this in my opinion. Also, if the user doesn't want any header tag the template should respect that.

Argus’s picture

Status: Active » Needs review
mpotter’s picture

Status: Needs review » Fixed

This makes sense. We want the View handler to specify the tag to use and not hardcode it into the template. Committed this to 75ae68b in oa_search.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.