Bad formed attachment's url

Moderator: crythias

Locked
rentalia
Znuny newbie
Posts: 4
Joined: 10 Jun 2011, 13:45
Znuny Version: 2.4

Bad formed attachment's url

Post by rentalia »

Hi everyone,

Ive upgrade the otrs version to 2.4.10 some week ago and everything was going right until we got this issue. The attachment url's are like this:

https://file_name?Action=AgentTicketAttachment.... Instead of -> https://name_domain/file_name?Action=AgentTicketAttachment....

Ive been making traces on the code (Kernel/Modules/AgentTicketPrint.pm) without any result but it seems to be that the $ENV{CGIHandle}, we got empty, this can be the reason what we got empty this variable. But i would like to know why we didnt get any trace from the tests on that file, is the urls already formated?¿ or maybe im looking for in wrong place. I am still getting this issue on our otrs, anyone know anything about it... or may explain me what is happening.

Thanks and cheers
rentalia
Znuny newbie
Posts: 4
Joined: 10 Jun 2011, 13:45
Znuny Version: 2.4

Re: Bad formed attachment's url

Post by rentalia »

Well, i think, i found it. The urls links are created by ArticleAttachmentDownload.pm, as i said, the problems is that the $ENV{cgihandle} is empty so what i did was this:

Code: Select all

 Action => 'Download',
        Link =>
            "https://mydomain?Action=AgentTicketAttachment;ArticleID=$Param{Article}->{ArticleID};FileID=$Param{File}->{FileID}",
        Image  => 'disk-s.png',
        Target => $Target,
And the problem is comming for my nginx+apache configuration, ngixn works like frontend and apache like backend, the point is nginx pass that variable empty or something like that, im on it. When i found the solutions i will post it here. Anyone know anything about this?¿
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: Bad formed attachment's url

Post by MichaelR »

Well Apache through CGI will pass that variable, but obviously nginx isn't.
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
rentalia
Znuny newbie
Posts: 4
Joined: 10 Jun 2011, 13:45
Znuny Version: 2.4

Re: Bad formed attachment's url

Post by rentalia »

Well, thats what i thougth, but i have done test which prove thats not correct. Ive gone to apache without proxy_pass from nginx and the error is still happening, so im not sure about the reason of the error was that. Now im a little lost, anyone recommend me anything?¿

Cheers
Locked