Summary: | Change language from external web fails | ||
---|---|---|---|
Product: | Koha | Reporter: | Hugo Agud <hagud> |
Component: | OPAC | Assignee: | Karam Qubsi <karamqubsi> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, karamqubsi, katrin.fischer, kyle, m.de.rooy, mtj |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19799 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Attachments: |
Bug-18946- Change-language-from-external-web-fails
Bug 18946 - Change language from external web fails Bug 18946 [QA Followup] - code cleanup Bug 18946 - Change language from external web fails Bug 18946 [QA Followup] - code cleanup |
Description
Hugo Agud
2017-07-17 13:30:21 UTC
Hi , Instead of using /cgi-bin/koha/opac-changelanguage.pl?language=en You may try :/cgi-bin/koha/opac-main.pl?language=en it look like opac-changelanguage.pl always assuming that you are on the same domain , there should be further tests to handle that perhaps something like this : my $domain = C4::Context->preference("OPACBaseURL"); my $url = $query->referer() || '/'; if ($query->referer() !~ /$domain/ ) { $url = $domain ; } Created attachment 65089 [details] [review] Bug-18946- Change-language-from-external-web-fails How to reproduce: 1. Get a multilingüal Koha like http://demo1.orex.es/cgi-bin/koha/opac-changelanguage.pl?language=en http://demo1.orex.es/cgi-bin/koha/opac-changelanguage.pl?language=es-ES 2. Copy that urls to any web page in an other domain -it must be in some host - and try to link to the spanish or english version,it will keep you in the same position. 3. Apply this patch and try again , everything should work fine . Sorry for the delay, the patch it works fine! thanks! Created attachment 66719 [details] [review] Bug 18946 - Change language from external web fails How to reproduce: 1. Get a multilingüal Koha like http://demo1.orex.es/cgi-bin/koha/opac-changelanguage.pl?language=en http://demo1.orex.es/cgi-bin/koha/opac-changelanguage.pl?language=es-ES 2. Copy that urls to any web page in an other domain -it must be in some host - and try to link to the spanish or english version,it will keep you in the same position. 3. Apply this patch and try again , everything should work fine . Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 66720 [details] [review] Bug 18946 [QA Followup] - code cleanup Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 66733 [details] [review] Bug 18946 - Change language from external web fails How to reproduce: 1. Get a multilingüal Koha like http://demo1.orex.es/cgi-bin/koha/opac-changelanguage.pl?language=en http://demo1.orex.es/cgi-bin/koha/opac-changelanguage.pl?language=es-ES 2. Copy that urls to any web page in an other domain -it must be in some host - and try to link to the spanish or english version,it will keep you in the same position. 3. Apply this patch and try again , everything should work fine . Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 66734 [details] [review] Bug 18946 [QA Followup] - code cleanup Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for 17.11, thanks to everybody involved! Pushed to 17.05.x, will be in 17.05.05. These patches have been pushed to 16.11.x and will be in 16.11.13. Pushed to 16.05.x, for 16.05.18 release This patch causes the bug reported on bug 19799. Especially if you use https and Plack.. |