[Bug 18946] New: Change language from external web fails

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 18946] New: Change language from external web fails

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18946

            Bug ID: 18946
           Summary: Change language from external web fails
 Change sponsored?: ---
           Product: Koha
           Version: 17.05
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: OPAC
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

We have identified that if you add the url to change language from one external
web to koha, it doesn't work it just send you again to your current web.

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 and try to link to the spanish or english
version,it will keep you in the same position

we suspect is opac-changelanguage.pl becuase it gets the url from the referer
and then construct a wrong url becuase of the referer... If

#my $url      = $query->referer() || '/';
my $url    = 'https://whatever/';

it works.. because we force the referer to the koha host domain

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 18946] Change language from external web fails

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18946

Karam Qubsi <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from Karam Qubsi <[hidden email]> ---
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  ;
}

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 18946] Change language from external web fails

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18946

Karam Qubsi <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]         |[hidden email]
             Status|NEW                         |Needs Signoff

--- Comment #2 from Karam Qubsi <[hidden email]> ---
Created attachment 65089
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65089&action=edit
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 .

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Loading...