Pictures in article disappear

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
anika
Posts: 8
Joined: Mon Nov 07, 2016 10:09 am

Pictures in article disappear

Post by anika »

Script URL: http://helpdesk.caratec.de
Version of script: ?
Hosting company: 1&1
URL of phpinfo.php: http://helpdesk.caratec.de/docs/phpinfo.php
URL of session_test.php: http://helpdesk.caratec.de/docs/session_test.php
What terms did you try when SEARCHING for a solution: picture lost, picture delete, image disappear

Write your message below:
Dear all,

you are so kind and supportive so I think you also have a solution for the error I experience:

I added some pictures by copy and paste function to my articles. After safing the article, the pix are no longer visible.
I experience this problem since the last update. Before I had no problems adding pictures this way.

When I open an "old" article and save it, the pictures are also no longer visible.

Thank you.

Kind regards

Anika
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: Pictures in article disappear

Post by Klemen »

Can you provide an example of an "old" article with a picture?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
anika
Posts: 8
Joined: Mon Nov 07, 2016 10:09 am

Re: Pictures in article disappear

Post by anika »

This is a bit difficult, as most of them have been modified and do not contain pictures anmore.
I have found one example which still contains pictures: http://helpdesk.caratec.de/admin/knowle ... 109&back=1
But be careful this article is only visible if you are logged in.

I will send you the login information by pm.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: Pictures in article disappear

Post by Klemen »

You are using data image src type. Adding it to the HTMLpurifier config should do the trick:

1. open file inc/htmlpurifier/HeskHTMLPurifier.inc.php in a powerful editor, such as the free Notepad++
2. find this line

Code: Select all

$config->set('Cache.SerializerPath', $this->cacheDir);
3. below that line add

Code: Select all

$config->set('URI.AllowedSchemes', array(
  'http' => true,
  'https' => true,
  'mailto' => true,
  'ftp' => true,
  'nntp' => true,
  'news' => true,
  'tel' => true,
  'data' => true,
)
);
4. save and test
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
anika
Posts: 8
Joined: Mon Nov 07, 2016 10:09 am

Re: Pictures in article disappear

Post by anika »

It seems to work at first sight :)

Thank you very much for your quick help!
harmhofstede
Posts: 6
Joined: Thu Jul 04, 2013 3:09 pm

Re: Pictures in article disappear

Post by harmhofstede »

This doesn't seem to work in 2.7.2 ?

Best regards,

Harm
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: Pictures in article disappear

Post by Klemen »

It should unless you are using some other way of inserting images into articles and not "data" src type.

Can you show a sample before (working) and after (not working) article you are having problems with?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply