Summary: | opac link doesn't open in new window | ||
---|---|---|---|
Product: | Koha | Reporter: | Nicole C. Engard <nengard> |
Component: | Templates | Assignee: | Juan Romay Sieira <juan.sieira> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | minor | ||
Priority: | P5 - low | CC: | abbyrobertson.student, arm, brendan, cbrannon, chris, david.roberts, eb, jdemuth, juan.sieira, julian.maurice, katrin.fischer, koha, liz, m.de.rooy, meteolib, mirko, mtj, nick, timdhannah, veron |
Version: | Main | Keywords: | Academy |
Hardware: | All | ||
OS: | All | ||
See Also: |
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11890 http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13644 |
||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Attachments: |
browser.js changed to modify all the links but not the target _blank
Bug 11937 - opac link doesn't open in new window Bug 11937 - opac link doesn't open in new window |
Description
Nicole C. Engard
2014-03-13 17:32:18 UTC
Hit enter too fast. On the staff detail page there is a link to open the opac view in a new window. It used to open in a new window, now it doesn't. I checked the code: [% IF ( OpacUrl ) %] <li><strong>OPAC view:</strong> <a href="http://[% OpacUrl %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]" target="_blank">Open in new window</a> </li> [% END %] and the resulting page code: <span class="results_summary"><span class="label">OPAC view: </span><a href="http://kohavm/cgi-bin/koha/opac-detail.pl?biblionumber=4091" target="_blank">Open in new window</a>. </span> Both have the target="_blank" so what's stopping it from opening in a new window? I was able to reproduce this bug only with my Windows Firefox installation when my regular addons were enabled. When I tried it with addons disabled it worked as expected. That suggests to me that this is a browser addon compatibility problem rather than a Koha bug. Any idea what plugin this could be? Other links with a target of _blank work on other sites for me and on other pages in Koha. For example on the staged marc management tool the link to biblionumber works there for me, but not the opac link. I am using Firefox on Mac. Nicole I have the same problem, haven't been able to tell which plugin it is yet. I could reproduce the issue in the following case (FF and IE tested): 1. Close all Browser windows. 2. First open OPAC 3. Then open Staff client in the same window (or tab) 4. Go to a biblio's detail page 5. Hit Link OPAC view: Open in new window. (Note: Make sure that OPACBaseURL is set, otherwise link will not display...) Result: OPAC opens in same window (because it was already opened in this window before) If I open first staff client and then hit the link, OPAC opens in a new window or tab as expected. I have a brand new Chrome install with no addons installed and I can reproduce this problem. I'm inclined to think that this is not related to a browser addon. I also couldn't get it to work using the steps listed in comment 5 - each time it opens in the same window/tab. This is tested with Chrome and IE. I can no longer reproduce the issue on current master (FF, IE and Chrome). Koha version: 3.17.00.060 Can reproduce in 3.16 and 3.18 in chrome and ie9 where staff detail page includes browse controls / url includes a searchid parameter. OPAC opens in new window, as expected, if staff side search finds and displays a single biblio (no browse controls, no searchid parameter). Can confirm in 3.18.02 - Debian - using Chrome. In a single record, clicking on "Open in new window" does not open a new window, but navigates to the OPAC in the current window. However, it does work as expected in Firefox. Can't recreate bug in Firefox 34.0 or Chromium 39.0.2171.65 Ubuntu 14.04 (64-bit) I was able to reproduce this using Tim's plan. It seems to be to do with the number of results you get back, and whether or not there is search navigation. Maybe we can talk more about it tomorrow. :) Koha 3.16.4 with Firefox Nightly 31.0, all add-ons (Firebug) disabled, still doesn't open in new window. Same for IE11. I don't think it has to do with number of results, as it isn't from a results page. It is from the record page (detail.pl). And I don't think it is the number of items in the record, because it is doing it with a record that only has 3 items. I can't reproduce Marc's findings. Tim has the most plausible scenario. I did a search for an item and the URL included a URL searchid parameter. When I click on the Open in new window link, it opens the OPAC in the current tab. When I back up, delete the searchid parameter and hit enter, same record opens without the Return to results control, and when I click on the link, it opens the OPAC in a new tab. When I put the searchid back, the problem comes back. I think Tim found the culprit. Christopher Just adding bug 11890 as a possible related issue. Seeing the same searchid appended to the link. VOKAL has both issues on our system. Disabling javascript clears the issue in both cases The number of search results only matters because, if you search and get only one result, you won't have the search navigation.Clicking the link will work. If you, say, click the 3rd record in a list of several results, you will then have the search navigation (upper left hand side), and the link will open in the current window. :) (In reply to Liz Rea from comment #14) > The number of search results only matters because, if you search and get > only one result, you won't have the search navigation.Clicking the link will > work. If you, say, click the 3rd record in a list of several results, you > will then have the search navigation (upper left hand side), and the link > will open in the current window. > > :) Yes, I agree. :) Christopher Hooray! We understand each other! o/*HIGHFIVE*\o *** Bug 14243 has been marked as a duplicate of this bug. *** (In reply to Christopher Brannon from comment #12) > Tim has the most plausible scenario. I did a search for an item and the URL > included a URL searchid parameter. When I click on the Open in new window > link, it opens the OPAC in the current tab. When I back up, delete the > searchid parameter and hit enter, same record opens without the Return to > results control, and when I click on the link, it opens the OPAC in a new > tab. When I put the searchid back, the problem comes back. I think Tim > found the culprit. Same for me in FF 38. Removing searchid parameter in URL made the difference. Still an issue - could we modify the script that adds the searchid to the URLs to not touch the OPAC link? Created attachment 47819 [details] [review] browser.js changed to modify all the links but not the target _blank Apply the patch, do a search, click on one results, and with the searchid on the url will not affect the link of the OPAC or other that has the target _blank attribute. Created attachment 47839 [details] [review] Bug 11937 - opac link doesn't open in new window Signed-off-by: Juan Romay Sieira <juan.sieira@xercode.es> Patch works as expected. From a biblio detail page, the link 'OPAC view: Open in new window' opens a new browser window. Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 47953 [details] [review] Bug 11937 - opac link doesn't open in new window Signed-off-by: Juan Romay Sieira <juan.sieira@xercode.es> Patch works as expected. From a biblio detail page, the link 'OPAC view: Open in new window' opens a new browser window. Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Pushed to Master - Should be in the May 2016 release. Thanks Patch pushed to 3.22.x, will be in 3.22.4 |