AJAX Error in German View

Moderator: crythias

Locked
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

AJAX Error in German View

Post by Gunjan »

Hi,

I am using otrs 3.3.4. I am facing a strange problem. When I select agent preferred language 'Deutch', and create a new ticket. after selecting customer user, it shows an AJAX error -
Error during AJAX communication. Status: parsererror, Error: SyntaxError: JSON.parse: unexpected end of data

while In English language, it does not show this error. Could you please tell me what the problem is? I am using external backend for customers.

Thanks in Advance!
Gunjan
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: AJAX Error in German View

Post by reneeb »

Did you change anything or is this still stock OTRS?

Please show the JSON that is sent... Add a logging to the backend.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: AJAX Error in German View

Post by Gunjan »

Which file do you want?? i did not change anything.
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: AJAX Error in German View

Post by Gunjan »

Could you please tell me where I can find JSON sent?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: AJAX Error in German View

Post by reneeb »

This is in Kernel/Modules/AgentTicketPhone.pm or Kernel/Modules/AgentTicketEmail.pm where the subaction 'AJAXUpdate' is handled.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: AJAX Error in German View

Post by Gunjan »

Hi,

I have found that in
my $JSON = $Self->{LayoutObject}->BuildSelectionJSON(


If I change in

Code: Select all

{
                    Name         => 'ServiceID',
                    Data         => $Services,
                    SelectedID   => $GetParam{ServiceID},
                    PossibleNone => 1,
                    Translation  => 1,
                    TreeView     => $TreeView,
                    Max          => 100,
                },
Translation => 0, then it works fine, but then it does not translate the services on the frontend. Could someone tell me how can I handle both the things means translation of services with ajax error.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: AJAX Error in German View

Post by reneeb »

Try to identify which service is the cause for the trouble and post the translated value here. I assume that an Umlaut and the wrong encoding might break it... In which encoding is the translation file stored (on Linux systems you can call "file -i Kernel/Language/de_.....pm") and do you use "use utf8;" in the translation file?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: AJAX Error in German View

Post by Gunjan »

how can I find the name of the service that is causing issue?? my file is de_ZZZCustom.pm and I am also using utf8 in file. How can I check encoding of file?
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: AJAX Error in German View

Post by Gunjan »

It is solved.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: AJAX Error in German View

Post by reneeb »

Gunjan wrote:It is solved.
Please post the solution, so that others who have similar problems get an idea about what can be done.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: AJAX Error in German View

Post by Gunjan »

In my custom Language File, for one service umlaut was not in the correct format. so this was causing AJAX error.
Locked