Page 1 of 1

Pictures in article disappear

Posted: Fri Dec 16, 2016 3:03 pm
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

Re: Pictures in article disappear

Posted: Sun Dec 18, 2016 3:04 pm
by Klemen
Can you provide an example of an "old" article with a picture?

Re: Pictures in article disappear

Posted: Thu Dec 22, 2016 8:00 am
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.

Re: Pictures in article disappear

Posted: Thu Dec 22, 2016 9:26 am
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

Re: Pictures in article disappear

Posted: Thu Dec 22, 2016 11:51 am
by anika
It seems to work at first sight :)

Thank you very much for your quick help!

Re: Pictures in article disappear

Posted: Thu Feb 16, 2017 10:33 am
by harmhofstede
This doesn't seem to work in 2.7.2 ?

Best regards,

Harm

Re: Pictures in article disappear

Posted: Thu Feb 16, 2017 3:12 pm
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?