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
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

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 39 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: 8315
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: Baidu [Spider], Yahoo [Bot] and 4 guests