Forum

Thread tagged as: Question, Problem

Files do not appear in perch and displayed

Hello

I have created a website several years ago for a client everything was workinf fine. She now wants to change text on the website. I talked her through how to do the text. One page is her polices and procedures the pdf files that are in the asssets and ones that I upload do not appear to be there. They are greyed out when you hover the pointer over the pdf's they discribe the pdf.

The diagnostic report is as folows:


Perch: 2.7.10, PHP: 5.6.30, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.7.10), assets (2.7.10), categories (2.7.10) App runtimes: <?php $apps_list = array( 'content', 'categories', ); PERCH_LOGINPATH: /mindsbev PERCH_PATH: /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/mindsbev PERCH_CORE: /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/mindsbev/core PERCH_RESFILEPATH: /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/mindsbev/resources Image manipulation: GD PHP limits: Max upload 8M, Max POST 8M, Memory: 128M, Total max file upload: 8M Resource folder writeable: Yes DOCUMENT_ROOT: /websites/123reg/LinuxPackage25/ma/rv/el/marvellousminds.co.uk/public_html HTTP_HOST: www.marvellousminds.co.uk REQUEST_URI: /mindsbev/core/settings/diagnostics/ SCRIPT_NAME: /mindsbev/core/settings/diagnostics/index.php

the code on teh page is as follows:

<?php perch_content('policies'); ?>

The template used is as follows:

<perch:repeater id="policies" label="Policies pdf" max="25">
<table width="800" border="0" cellspacing="4" cellpadding="4" align="center">
            <perch:before><tr></perch:before>
                <td>
                    <span class="C-13">
                        <strong>
                            <a href="<perch:content id="policies" type="file" accept="pdf doc" label="Policies" />" target="_blank">
                            <perch:content type="text" id="desc" label="Link Text" order="1" required="true" title="true" />
                            </a>
                        </strong>
                     </span>
                 </td>
          <perch:after></tr></perch:after>
        </table>
</perch:repeater>

I do have a arror report on the page when I uploaded pdfs I am not sure what it means and could be the cause of the problem the warning is as follows:

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/policies.php:1) in /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/mindsbev/core/lib/PerchSession.class.php on line 9

I hope that somone will be able to help.

Thanks in advance,

Paul

Paul Quillin-Creamer

Paul Quillin-Creamer 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What's on public_html/policies.php at line 1?

The version you're running is very out of date.

Hi Drew

line 1 is:

<?php include('mindsbev/runtime.php');?>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is that your Perch runtime?

The core runtime.php is:

<?php
    include(dirname(__FILE__).'/core/runtime/runtime.php');
?>

Sorry this incorrect the core/runtime/runtime.php file is:

<?php
    if (defined('PERCH_ERROR_MODE')) {
      if (strpos($_SERVER['SCRIPT_NAME'], 'start.php')) {
        die('You have included the Perch runtime in your page template. Please remove it - Runway will include it for you.');
      }else{
        die('You have included the Perch runtime in your page more than once. Please only include it once.');  
      }
    }  

    define('PERCH_ERROR_MODE', 'SILENT');
      include(__DIR__.'/../inc/pre_config.php');
    include(__DIR__.'/../../config/config.php');
    if (!defined('PERCH_PRODUCTION_MODE')) define('PERCH_PRODUCTION_MODE', PERCH_PRODUCTION);
    include(PERCH_CORE . '/runtime/loader.php');
    include(PERCH_CORE . '/inc/apps.php');
    include(PERCH_PATH . '/core/inc/forms.php');

    if (file_exists(PERCH_PATH . '/config/feathers.php')){
      include(PERCH_PATH . '/config/feathers.php');
      include(PERCH_PATH . '/core/inc/feathers.php');
    }

sorry

the core/runtime/runtime.php file is:

<?php
    if (defined('PERCH_ERROR_MODE')) {
      if (strpos($_SERVER['SCRIPT_NAME'], 'start.php')) {
        die('You have included the Perch runtime in your page template. Please remove it - Runway will include it for you.');
      }else{
        die('You have included the Perch runtime in your page more than once. Please only include it once.');  
      }
    }  

    define('PERCH_ERROR_MODE', 'SILENT');
      include(__DIR__.'/../inc/pre_config.php');
    include(__DIR__.'/../../config/config.php');
    if (!defined('PERCH_PRODUCTION_MODE')) define('PERCH_PRODUCTION_MODE', PERCH_PRODUCTION);
    include(PERCH_CORE . '/runtime/loader.php');
    include(PERCH_CORE . '/inc/apps.php');
    include(PERCH_PATH . '/core/inc/forms.php');

    if (file_exists(PERCH_PATH . '/config/feathers.php')){
      include(PERCH_PATH . '/config/feathers.php');
      include(PERCH_PATH . '/core/inc/feathers.php');
    }
Drew McLellan

Drew McLellan 2638 points
Perch Support

I now what's in those files - I wrote them. What I meant is, is mindsbev/runtime.php your Perch runtime? You've renamed it, so I was just checking.

You're many many versions behind. If it was working and now isn't, then something other than Perch has changed. If you're not able to ascertain what and would like tech support from us, then you need to be running the current version. We can't offer support for old versions when free updates are available.

Hello

I have changed the core files to V3.04 and the assets (PDF's) are still greyed out in the Assets panel. I have tried to upload a new pdf but it is still greyed out.

Paul

Drew McLellan

Drew McLellan 2638 points
Perch Support

What do you mean by greyed out?

When you look at the Assets page. See here https://www.marvellousminds.co.uk/assets%20page.jpg

Drew McLellan

Drew McLellan 2638 points
Perch Support

Those aren't greyed out, they just don't have thumbnails.

When I click Select or upload a file. Those assets will not attach to the relivant asset title that goes on the page.

www.marvellousminds.co.uk/poilices_admin_page.jpg

Drew McLellan

Drew McLellan 2638 points
Perch Support

You said you've updated to 3.0.4, but that's not 3.0.4 you're showing me.

Hello Drew

I followed the instructions to upgrade to Perch V3 :https://docs.grabaperch.com/perch/upgrading/

Do you think that the template file is incorrect for uploading pdf files?

Best regards,

Paul

Drew McLellan

Drew McLellan 2638 points
Perch Support

You've not if that's the screen you're seeing. That's still the Perch 2 UI.

Hello

The document says that you only have to upload the core files which I have done. Are the Perch 3 UI in the core files?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, they are. If you've updated you should see a completely new user interface - nothing like what's in your screenshots.

Hello

I have installed the new version of perch and I am getting warning messages at the top of the pages see example: https://www.marvellousminds.co.uk/research.php

The text says: /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/research.php:1) in /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/marvmindbev/core/lib/PerchUtil.class.php on line 1405

Warning: Cannot modify header information - headers already sent by (output started at /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/research.php:1) in /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/marvmindbev/core/lib/PerchUtil.class.php on line 1406

Warning: Cannot modify header information - headers already sent by (output started at /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/research.php:1) in /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/marvmindbev/core/lib/PerchUtil.class.php on line 1407

Warning: Cannot modify header information - headers already sent by (output started at /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/research.php:1) in /websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/marvmindbev/core/lib/PerchUtil.class.php on line 1413

I hope that you can help

Thanks in advance,

Paul

Drew McLellan

Drew McLellan 2638 points
Perch Support

What's on research.php at line 1?

<?php include('marvmindbev/runtime.php');?>

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is there any whitespace before it?