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
Guest
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
Guest
Registered: 2008-10-16
Posts: 28

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
Guest
Registered: 2017-11-30
Posts: 7

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
Guest
Registered: 2012-04-10
Posts: 38

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
Guest
From: China
Registered: 2013-12-23
Posts: 35

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.5.39 - GLPI 9.2.1 (600+ users authenticated with AD in 20+ entities)

Offline

Board footer

Powered by FluxBB