You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2017-11-23 11:23:32

LivBow
Member
Registered: 2009-01-28
Posts: 1

[GLPI 9.2.1] URL Images using local path instead of relative path

We're having a weird problem.

The inline images are using a incorrect link.

Example:

Image in mail.
In Ticket appears the cid ID (  0973ae8c-d9d62df8-5a15f48d749041.31281015 ). Ticket url: http://glpi.xxxx.xxxxx/front/ticket.form.php?id=5928
When checking URL, it shows: http://glpi.xxxx.xxxxx/var/www/html/glp … docid=1684, and don't work.

NOTE: /var/www/html/glpi/ is the installation path!

If i correct the link to http://glpi.xxxx.xxxxx/front/document.s … docid=1684, image appears correctly.

Where is my problem?

Thanks!

EC

Last edited by LivBow (2017-11-23 14:56:06)

Offline

#2 2017-11-27 11:10:34

renzo
Member
Registered: 2008-10-16
Posts: 43

Re: [GLPI 9.2.1] URL Images using local path instead of relative path

Hello,

I have the same problem on GLPI 9.2.1.

Often the problem is using a ticket created by receiver.

Thanks in advanced for your help.

Offline

#3 2017-12-01 12:41:08

jpsbatista
Member
Registered: 2017-11-30
Posts: 8

Re: [GLPI 9.2.1] URL Images using local path instead of relative path

Hi, i have same problem on GLPI 9.2.1.

Offline

#4 2017-12-11 13:19:55

LucaC
Member
Registered: 2012-04-10
Posts: 44

Re: [GLPI 9.2.1] URL Images using local path instead of relative path

Hi,
Also the same issue here.
Ended up adding the following lines to GLPI config in Apache

Note: I installed GLPI under /srv/glpi so images URL is something like http://server/srv/glpi/... so I needed to remove th /srv/ part

alias /glpi/ /srv/glpi/

<Location /srv>
    RewriteEngine On
    RewriteRule ^(.*)/srv/glpi/(.*) /glpi/$2 [R]
</Location>

<Location /glpi>
..
..
</Location>

Last edited by LucaC (2017-12-11 13:20:12)

Offline

#5 2017-12-15 05:38:29

MarcW
Member
From: China
Registered: 2013-12-23
Posts: 41

Re: [GLPI 9.2.1] URL Images using local path instead of relative path

Yes, rewrite should work or another solution is to edit glpi/inc/html.class.php to overwrite this part (around line 5470):

                  // Replace tags by image in textarea

                  if ($addLink) {
                     $out .= '<a href="/glpi/front/document.send.php?docid='.$id.
                             '" target="_blank"><img alt="'.$image['tag'].
                             '" height="'.$height.'" width="'.$width.
                             '" src="/glpi/front/document.send.php?docid='.$id.'" /></a>';
                  } else {
                     $out .= '<img alt="'.$image['tag'].
                             '" height="'.$height.'" width="'.$width.
                             '" src="/glpi/front/document.send.php?docid='.$id.'" />';
                  }

source (in french)


Prod: Windows 2008 R2 - Apache 2.4.26 (Win64) - OpenSSL 1.1.0f - PHP 7.1.6 - MySQL 5.7.23 - GLPI 9.3.1 (600+ users authenticated with AD in 20+ entities)

Offline

#6 2018-02-02 20:27:16

sarsen
Member
Registered: 2015-03-03
Posts: 13

Re: [GLPI 9.2.1] URL Images using local path instead of relative path

Hello,

I have the same problem with inline image not showing in the ticket.  But it works if i manually run the collector the inline image show up perfectly, but if i let the cron (automatic action) to collect the email, at that time i get no inline image in my tickets. 

Only way i got it fixed was a combination of code modification that MarcW mentionned in this post plus another modification from SoluNeXT found here https://github.com/glpi-project/glpi/issues/2869

tks guys

Last edited by sarsen (2018-02-02 21:23:07)


GLPI 9.2.1 | Wampserver 3.1.0 | Apache 2.4.27 | PHP 7.1.9 | MySQL 5.7.19

Offline

#7 2018-05-29 20:41:08

noanoe1
Member
Registered: 2015-05-14
Posts: 6

Re: [GLPI 9.2.1] URL Images using local path instead of relative path

Hi, I have the same problem in GLPI 9.2.3. Has anyone found the solution?
Thanks!!

Offline

Board footer

Powered by FluxBB