Forum

Thread tagged as: Comments

Images in comments disappearing

Hi,

I hope you can help. This issue is exclusive to comments in Perch. Many of our comments include images.

Take this page: https://dnatestingchoice.com/health-testing/provider/dnafit/428 - there are a few pictures missing as you scroll down the page.

One of the images you'll find in the source is: https://dnatestingchoice.com/perch/resources/dnafit-personal-power-potenital-600x212-1-w600.jpg

This was working a few days ago - you can see this working image: https://dnatestingchoice.com/perch/resources/dnafit-personal-power-potenital-600x212-1.jpg

I don't understand what the difference is between this image and the one above ending in '-w600'. I also don't understand what is triggering this and would really like some insight here.

This is the third or fourth time this has happened. The only way we've managed to fix it is to save the comment again in Perch. There are several hundred comments on this website so to do this on a weekly basis is not really good enough!

Thanks in advanced.

~~~

Diagnostic report

Perch: 2.8.4, PHP: 5.4.36, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.4), assets (2.8.4), categories (2.8.4), perch_blog (4.6), perch_forms (1.7), perch_comments (1.0.1) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_blog', 'perch_comments' ); PERCH_LOGINPATH: /perch PERCH_PATH: /home/dnatesti/public_html/perch PERCH_CORE: /home/dnatesti/public_html/perch/core PERCH_RESFILEPATH: /home/dnatesti/public_html/perch/resources Image manipulation: GD Imagick PHP limits: Max upload 40M, Max POST 40M, Memory: 512M, Total max file upload: 40M Resource folder writeable: Yes DOCUMENT_ROOT: /home/dnatesti/public_html HTTP_HOST: dnatestingchoice.com REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Craig Macpherson

Craig Macpherson 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

How are the images being added to comments? The Comments app doesn't have that functionality.

Hi Drew,

We've taken over this build from another developer so wasn't aware this wasn't a feature of Perch! Perhaps this was built on top of Perch? There are a series of meta fields in the comments and the comments box itself is a WYSIWYG rich editor.

I'll investigate further and let you know if I have any specific questions.

Thanks

Dean

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's quite possible that the developer didn't take the asset clean-up routines into account when implementing this. Assets can be added, but if they're not logged against the content for which they're used, they'll get automatically cleaned up as the system will think they're just wasting space.

A workaround would be to turn off the asset clean-up routine in your config/config.php file:

define('PERCH_CLEAN_RESOURCES', false);