Forum

Thread tagged as: Error

PHP Notice when showing a select box in collections Item list column IDs

Here's my template:

<perch:categories id="area" set="areas-geographical" label="Area" required="true" />
<perch:content id="parish_name" type="text" label="Parish Name" title="true" />
<perch:categories id="borough" set="boroughs" label="Borough" required="true" />
<perch:content id="church_size" type="text" label="Church Size" />
<perch:content id="description" type="text" label="Description" title="true"  />
<perch:categories id="activity_type" set="activity-type" label="Activity Type" />
<perch:categories id="area_of_concern" set="area-of-concern" label="Area of concern" required="true" />
<perch:content id="beneficiaries" type="text" label="Beneficiaries" />
<perch:content id="volunteers" type="text" label="Volunteers" />
<perch:content id="notes" type="text" label="Notes" />
<perch:content id="status" type="select" label="Status" options="Active,Archived" default="Active" />

If I add the "status" field to my list of field IDs that is listed in the list view, I get the error message

Notice: Undefined offset: 1 in /PATH TO/local/perch/core/lib/PerchFieldTypes.class.php on line 701

Notice: Undefined offset: 1 in /PATH TO/local/perch/core/lib/PerchFieldTypes.class.php on line 701

Is this because it's a select field?

Paul Bell

Paul Bell 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you post your diagnostics?

Sure

Perch Runway: 2.8.14, PHP: 5.6.10, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.14), assets (2.8.14), categories (2.8.14), perch_blog (4.6), collection_2 (2.8.14), perch_forms (1.8.3), collection_1 (2.8.14), perch_comments (1.2), perch_members (1.3), perch_podcasts (1.1), perch_backup (1.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_comments', 'perch_blog', 'perch_events', 'perch_forms', 'perch_podcasts', 'perch_members', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/paulbell/Documents/Work/Capital Mass/Main/local/perch
PERCH_CORE: /Users/paulbell/Documents/Work/Capital Mass/Main/local/perch/core
PERCH_RESFILEPATH: /Users/paulbell/Documents/Work/Capital Mass/Main/local/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
Resource folder writeable: Yes
HTTP_HOST: local.capitalmass.org.uk
DOCUMENT_ROOT: /Users/paulbell/Documents/Work/Capital Mass/Main/local
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can work around it with:

options="Active|Active,Archived|Archived"

Thanks Drew.