Forum

Thread tagged as: Configuration

Repeating region

Hello

I have tried to get regions repeated in a table. I have created a template called: staff_profiles.html Which looks like this:

<perch:repeater id="marvellous_profiles" label="Marvellous Profile" max="15"> 
<perch:before><table width="961" border="0" cellspacing="0" cellpadding="0"></perch:before>


      <tr>

    <td><span class="C-5"><strong><perch:content type="text" id="Name" label="Full Name" /></strong></span></td>
    <td width="245" rowspan="3" valign="top"><perch:content type="image" id="image" label="Image"  width="245" height="330"/></td>
  </tr>
  <tr>
    <td><span class="C-5"><strong><perch:content type="text" id="qualification" label="Qualification" /></strong></span></td>
  </tr>
  <tr>
    <td style="padding-right:10px;">
      <p class="C-13"><perch:content type="text" id="biography" label="Biography" /></p></td>

    </tr>

<perch:after></table></perch:after>
</perch:repeater> 

I placed this in the template/content folder

The code at the top of the .php page is: <?php include('BevMarvel/runtime.php');?>

The code to insert the template is: <?php perch_content('Marvellous Profiles'); ?>

When in the admin area it shows the page and new. I set the template Staff Profiles and check the box that says Allow multiple items. I then click Submit and get the following message:

Not Found

The requested URL /bevmarvel/core/apps/content/edit/ was not found on this server.

Can anyone help.

Paul

Paul Quillin-Creamer

Paul Quillin-Creamer 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do other regions save without problems?

No I get the same error message what ever template I use.

Paul

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you try reuploading the perch/core folder?

Hi

I have uploaded the perch/core files using filezilla and I am still getting the same error

Hi

I found out what the issue was. The file which contained the perch files was BevMevel should have been lower case bevmarvel. It seems to be working fine now.

Many Thanks,

Paul

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great.

Hello

I have managed to get the fields to display in the admin area. The text fields display as they should however I am having issues with the image. I have uploaded the image it shows in the assets. I looked at it in preview and got the following in the header:

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/profiles.php:1) in/websites/123reg/LinuxPackage22/ma/rv/el/marvellousminds.co.uk/public_html/bevmarvel/core/lib/PerchSession.class.php on line 9

I then just saved the changes and in stead if the image on the page I got: /bevmarvel/resources/bev-morris-1-w245h330.jpg displaeyed instead if the image.

see the page:https://www.marvellousminds.co.uk/profiles.php

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have any whitespace outside of the PHP tags in your config.php file?

Hello The config file is as follows:

[deleted]

Drew McLellan

Drew McLellan 2638 points
Perch Support

You'll need to change your passwords having posted those to a public forum.

It also doesn't help as I can't see extra whitespace from you copying and pasting the contents.

What's on line 1 of profiles.php?

Hello Drew

Lines 1-10 are a follows for profiles.php:

<?php include('bevmarvel/runtime.php');?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Marvellouse Minds - Profiles</title>
    <meta name="viewport" content="width=980">
    <link rel="stylesheet" type="text/css" href="wpscripts/wpstyles.css">
    <style type="text/css">
    </style>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. You've got some whitespace being output somewhere. That's what's stopping sessions working.

Hello Drew

Would that be in the config.php, The template staff_profiles.html or the profiles.php?

Paul

Drew McLellan

Drew McLellan 2638 points
Perch Support

profiles.php or anything that in pulls in, like config.php or even apps.php