Priority: Normal
Current State: Waiting for Feedback
Released In: n/a
Target Release:
Applies To: Extension
Component: SolrPlugin
Branches:
A user reported to me that there were display issues in WebSearch results (on a site using SolrPlugin for search) and I finally tracked it down to
ajax-solr-widgets.js
rendering of topics with tags in search results. Specifically, the
renderTopicInfo
in
line 1119 of ajax-solr-widgets has an unclosed
<i>
tag:
result += '<i class="fa fa-tag" /> ';
...should be
result += '<i class="fa fa-tag" /></i> ';
A minor thing but needs to be corrected in subsequent release.
--
LynnwoodBrown - 10 Aug 2023
This is not a correct fix.
- The file you are trying to patch is auto-generated based on
pub/System/SolrPlugin/widgets/ResultWidget.uncompressed.js
. That's the actual source of the code line.
- I cannot see where the opening <li> is.
- The patch adds a closing </li> for every tag of the topic to render infos for.
Could you provide a screenshot of what the page looks like, maybe the html sources that are wrong? Thanks.
--
MichaelDaum - 11 Aug 2023
Ok, first let me clear up a mistake in my earlier comment (and corrected now in text above): it was an unclosed "i" (icon) tag,
not an "li" tag. Apologies for that confusing detail.
I came up with this fix by comparing the current distributed version of
ajax-solr-widgets.js
to a later, non-published version I checked (on a client we both work with). The newer version had the close-i tag on the line of code referenced above. I copied over that version of just the one file to a server where I was seeing the issue to see what it would do and it fixed the issue so I figure the change was limited but I understand there may have been other changes. Just now, I tried just removing the close-i tag from the new version of the file and it did replicate the issue. I'm attaching a screenshot of what the issue looks like. After the first first topic with a tag is displayed, you'll notice various rendering issues such as repeated tag icons and the font changes (to serif) for rest of page.
![Screenshot 2023-08-11 at 9.59.08 AM.png Screenshot 2023-08-11 at 9.59.08 AM.png](/pub/Tasks/Item15205/igp_47d7df5dc77aa3645976d038739fe308_Screenshot%202023-08-11%20at%209.59.08%20AM.png)
Examination of the rendered html code shows following the first tag displayed ("Yard Work"), there are two non-greyed tag icons. All the subsequent text is rendered under the
second tag icon (which has unclosed i tag). I've copied the html from that
i
tag onward which also shows repeats of the same pattern (nested un-closed i tags).
Urls, names, and blank lines removed.
<i class="fa fa-tag">
<div class="solrSearchHit solrTopicHit clearfix">
<h3>
<i class="solrHitIcon foswikiIcon jqIcon fa fa-certificate"></i>
<a href="/Log/WorkPaymentRates">Work Payment Rates</a>
<span class=" solrContainerLink foswikiGrayText foswikiNormal">
in <a href="http://not/a/valid/url">Work Log</a>
</span>
</h3>
<div class="foswikiTopicSummary">Setting rates for payments</div>
<div class="solrRevision">
Saturday, 5th August 2023, 09:55, SomeOne
</div>
<div class="solrHilite">
Pay Rates:
Set someone 15
Set someone 15
Set someone 20
</div>
<span class="foswikiClear"></span>
<div class="solrTopicInfo foswikiGrayText">
</div>
</div>
<div class="solrSearchHit solrTopicHit clearfix">
<h3>
<i class="solrHitIcon foswikiIcon jqIcon fa fa-certificate"></i>
<a href="/Log/EggLog">Egg Log</a>
<span class=" solrContainerLink foswikiGrayText foswikiNormal">
in <a href="http://not/a/valid/url">Work Log</a>
</span>
</h3>
<div class="foswikiTopicSummary">Tracking egg production</div>
<div class="solrRevision">
Sunday, 30th July 2023, 20:18, SomeOne
</div>
<div class="solrHilite">
</div>
<span class="foswikiClear"></span>
<div class="solrTopicInfo foswikiGrayText">
<i class="fa fa-tag">chickens
</i></div><i class="fa fa-tag">
</i></div><i class="fa fa-tag">
<div class="solrSearchHit solrTopicHit clearfix">
<h3>
<i class="solrHitIcon foswikiIcon jqIcon fa fa-clock-o"></i>
<a href="/Log/WorkLog202305001">WorkLog202305001</a>
<span class=" solrContainerLink foswikiGrayText foswikiNormal">
in <a href="http://not/a/valid/url">Work Log</a>
</span>
</h3>
<div class="foswikiTopicSummary">Mccall work</div>
<div class="solrRevision">
Tuesday, 30th May 2023, 13:58, SomeOne
</div>
<div class="solrHilite">
</div>
<span class="foswikiClear"></span>
<div class="solrTopicInfo foswikiGrayText">
</div>
</div>
<div class="solrSearchHit solrTopicHit clearfix">
<h3>
<i class="solrHitIcon foswikiIcon jqIcon fa fa-clock-o"></i>
<a href="/Log/WorkLog202304001">WorkLog202304001</a>
<span class=" solrContainerLink foswikiGrayText foswikiNormal">
in <a href="http://not/a/valid/url">Work Log</a>
</span>
</h3>
<div class="foswikiTopicSummary">Turn compost pile.</div>
<div class="solrRevision">
Thursday, 20th April 2023, 09:57, SomeOne
</div>
<div class="solrHilite">
</div>
<span class="foswikiClear"></span>
<div class="solrTopicInfo foswikiGrayText">
<i class="fa fa-tag">Compost, Garden
</i></div><i class="fa fa-tag">
</i></div><i class="fa fa-tag">
<div class="solrSearchHit solrTopicHit clearfix">
<h3>
<i class="solrHitIcon foswikiIcon jqIcon fa fa-usd"></i>
<a href="/Log/PymtRec00025">PymtRec00025</a>
<span class="foswikiGrayText foswikiNormal solrContainerLink">
in <a href="http://not/a/valid/url">Work Log</a>
</span>
</h3>
<div class="foswikiTopicSummary">Payment to Some Body for 29 hours</div>
<div class="solrRevision">
Wednesday, 15th February 2023, 13:45, SomeOne
</div>
<div class="solrHilite">
</div>
</div>
<div class="solrSearchHit solrTopicHit clearfix">
<h3>
<i class="solrHitIcon foswikiIcon jqIcon fa fa-clock-o"></i>
<a href="/Log/WorkLog202211003">WorkLog202211003</a>
<span class=" solrContainerLink foswikiGrayText foswikiNormal">
in <a href="http://not/a/valid/url">Work Log</a>
</span>
</h3>
<div class="foswikiTopicSummary">Taking care of animals</div>
<div class="solrRevision">
Wednesday, 15th February 2023, 13:45, SomeOne
</div>
<div class="solrHilite">
</div>
<span class="foswikiClear"></span>
<div class="solrTopicInfo foswikiGrayText">
</div>
</div>
<div class="solrSearchHit solrTopicHit clearfix">
<h3>
<i class="solrHitIcon foswikiIcon jqIcon fa fa-clock-o"></i>
<a href="/Log/WorkLog202301001">WorkLog202301001</a>
<span class=" solrContainerLink foswikiGrayText foswikiNormal">
in <a href="http://not/a/valid/url">Work Log</a>
</span>
</h3>
<div class="foswikiTopicSummary">Misc work expenses</div>
<div class="solrRevision">
Wednesday, 15th February 2023, 13:45, SomeOne
</div>
<div class="solrHilite">
</div>
<span class="foswikiClear"></span>
<div class="solrTopicInfo foswikiGrayText">
</div>
</div>
<div class="solrSearchHit solrTopicHit clearfix">
<h3>
<i class="solrHitIcon foswikiIcon jqIcon fa fa-file-text-o"></i>
<a href="/Log/WebLinks">WebLinks</a>
<span class="foswikiGrayText foswikiNormal solrContainerLink">
in <a href="http://not/a/valid/url">Work Log</a>
</span>
</h3>
<div class="foswikiTopicSummary"></div>
<div class="solrRevision">
Friday, 10th February 2023, 15:16, SomeOne
</div>
<div class="solrHilite">
WebLinks
EggLog Egg Log Tracking Egg Production
"
else ""
Recent changes
$n "
footer " "
format "
$expand(topictitle)
$formfield(Summary)
"
</div>
</div>
<div class="solrSearchHit solrTopicHit clearfix">
<h3>
<i class="solrHitIcon foswikiIcon jqIcon fa fa-clock-o"></i>
<a href="/Log/WorkLog202211002">WorkLog202211002</a>
<span class=" solrContainerLink foswikiGrayText foswikiNormal">
in <a href="http://not/a/valid/url">Work Log</a>
</span>
</h3>
<div class="foswikiTopicSummary">Tree cut burn amd driveway gravel</div>
<div class="solrRevision">
Thursday, 3rd November 2022, 10:06, McCaull Durkin
</div>
<div class="solrHilite">
</div>
<span class="foswikiClear"></span>
<div class="solrTopicInfo foswikiGrayText">
</div>
</div>
</i></i></i>
Hope this is helpful to locate the proper fix.
--
LynnwoodBrown - 11 Aug 2023
Thats even more broken. The <i ... /> is self-closing. So no closing </i> is required. Your could now contains lots of <i> elements where they arent supposed to be. The <i> element is only for icons.
--
MichaelDaum - 11 Aug 2023
Hmmm. Not sure why it works then.
--
LynnwoodBrown - 11 Aug 2023