OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



SEHL Bug 2.2-2.3: doesn't handle empty query terms parameter

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

SEHL Bug 2.2-2.3: doesn't handle empty query terms parameter

Postby mgregson » Sun Nov 11, 2012 10:58 pm

The Search Engine HighLighting plugin tries to highlight query terms in the page even when the query parameter in the referring URL is empty. This was observed because Google is not providing the query terms in the referer header when Google is accessed via SSL.

To reproduce:
  1. Go to SSL Google, https://google.com
  2. Query "new horizons site:fyhejournal.com"
  3. Follow the link to the top result - the page layout is broken and if you inspect the source you will see <span class="sehl"></span> everywhere.

This affects 2.2 and 2.3.

I've attached a patch that resolves the issue.

Cheers
Mark

EDIT: I've noted a second issue, the output filter mangles the body tag and leaves it unclosed. I've updated the attached patch to correct this also.
Attachments
ojs_sehl_emptyterms.patch
Patch against 2.3
(1.16 KiB) Downloaded 62 times
mgregson
 
Posts: 14
Joined: Wed Jan 19, 2011 8:22 pm

Re: SEHL Bug 2.2-2.3: doesn't handle empty query terms param

Postby asmecher » Tue Nov 13, 2012 10:33 am

Hi Mark,

Thanks for contributing; I've filed this issue at http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8018 and committed the changes.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: SEHL Bug 2.2-2.3: doesn't handle empty query terms param

Postby mgregson » Mon Nov 19, 2012 8:55 pm

No problem, thanks Alec!

Mark
mgregson
 
Posts: 14
Joined: Wed Jan 19, 2011 8:22 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 2 guests