Forum

Thread tagged as: Question, Problem, Runway

Weird Error - Undefined offset: 1

Getting this weird error

"Notice: Undefined offset: 1 in D:\C\xampp\htdocs\FT_wiganwarriors.com\admin\core\lib\PerchFieldTypes.class.php on line 681"

On my region page

This is my Page

<?php

    /**
    * Here we out putting the title of detail page in a separate template
    * We added an if statement showing to display the player title or just dispay
    * The generic title which is 'First Team'
    * Generic information avialable here - https://solutions.grabaperch.com/architecture/layout-variables
    */

    if (perch_get('s')) {
        $team = perch_content_custom('First Team', array(
            'template'      => 'squad/team_title.html',
            'filter'        => 'slug',
            'match'         => 'eq',
            'value'         => perch_get('s'),
            'count'         => 1,
            'skip-template' => 'true',
        ));
        $title = $team[0]['name'];

    } else {

        $title =  "First Team";

    }

    // Include the header. You can find this in tempates/layouts/global
    perch_layout('global/header', [
        'title'=> $title,
    ]);
?>

<section class="container">

    <div class="group">
        <div class="span4 grid-style-helper">
            <?php
                perch_pages_navigation(array(
                'from-path' => '/teams',
                'include-parent' => false,
                'template' => 'item.html'
                ));
            ?>
        </div>

        <div class="span8">

            <?php

                /**
                * This is a List and Detail Section of the Website for Perch
                * Read More here - https://solutions.grabaperch.com/architecture/how-do-i-create-list-detail-pages
                * First we need to create the region by using 'perch_content_create'
                * Then we add a detail mode then a list mode
                * When the region is create we can delete the content_create region
                */

                if (perch_get('s')) {
                    // Detail mode
                    perch_content_custom('First Team', array(
                        'template' => 'squad/first_team_detail.html',
                        'filter' => 'slug',
                        'match' => 'eq',
                        'value' => perch_get('s'),
                        'count' => 1,
                    ));

                } else {
                    // List mode
                    perch_content_custom('First Team', array(
                        'template' => 'squad/first_team_list.html'
                    ));
                }
            ?>

        </div>
    </div>
</section>

<?php
    // Include the footer. You can find this in tempates/layouts/global
    perch_layout('global/footer');
?>

Report is here


Perch information Perch: 2.7.10 Production mode: Production (100) Installed apps: content (2.7.10), assets (2.7.10), categories (2.7.10), perch_blog (4.5.4) DB driver: PDO DB tables: perch2_backup_plans, perch2_backup_resources, perch2_backup_runs, perch2_blog_authors, perch2_blog_comments, perch2_blog_index, perch2_blog_posts, perch2_blog_posts_to_tags, perch2_blog_sections, perch2_blog_tags, perch2_categories, perch2_category_counts, perch2_category_sets, perch2_collection_index, perch2_collection_items, perch2_collection_revisions, perch2_collections, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_navigation, perch2_navigation_pages, perch2_page_routes, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users Users: 1 App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', ); Scheduled tasks for perch_blog: delete_spam_comments (1440 mins) Editor plug-ins: markitup H1: 64e640484d3942da2363c9a04965b329 L1: 36a56a90021366a6d13248c6cf9b2c78 headerColour: #a91b32 content_singlePageEdit: 1 helpURL: siteURL: / hideBranding: 1 content_collapseList: 1 lang: en-gb update_2.7.2: done headerScheme: dark latest_version: 2.7.10 on_sale_version: 2.7.10 dashboard: 0 hide_pwd_reset: 0 content_hideNonEditableRegions: 0 content_frontend_edit: 0 logoPath: /admin/resources/1415619146_wigan.png perch_blog_update: 5.0 perch_blog_post_url: /news/{postSlug} update_2.7.4: done perch_blog_slug_format: %Y-%m-%d-{postTitle} perch_blog_akismet_key: perch_blog_max_spam_days: 0 perch_blog_comment_notify: 0 update_2.7.10: done PERCH_DEVELOPMENT: 10 PERCH_STAGING: 50 PERCH_PRODUCTION: 100 PERCH_SITEPATH: C:\xampp\htdocs\FT_wiganwarriors.com PERCH_SCHEDULE_SECRET: *****HIDDEN***** PERCH_DB_USERNAME: *****HIDDEN***** PERCH_DB_SERVER: *****HIDDEN***** PERCH_DB_DATABASE: *****HIDDEN***** PERCH_DB_PREFIX: perch2_ PERCH_EMAIL_FROM: chris@fishtankcreative.co.uk PERCH_EMAIL_FROM_NAME: Chris Gorrod PERCH_LOGINPATH: /admin PERCH_PATH: D:\C\xampp\htdocs\FT_wiganwarriors.com\admin PERCH_CORE: D:\C\xampp\htdocs\FT_wiganwarriors.com\admin\core PERCH_RESFILEPATH: D:\C\xampp\htdocs\FT_wiganwarriors.com\admin\resources PERCH_RESPATH: /admin/resources PERCH_HTML5: 1 PERCH_TZ: UTC PERCH_RUNWAY: 1 PERCH_ERROR_MODE: DIE PERCH_DATE_LONG: %d %B %Y PERCH_DATE_SHORT: %d %b %Y PERCH_TIME_SHORT: %H:%M PERCH_TIME_LONG: %H:%M:%S PERCH_DEBUG: PERCH_PREVIEW_ARG: preview PERCH_TEMPLATE_PATH: D:\C\xampp\htdocs\FT_wiganwarriors.com\admin\templates PERCH_DEFAULT_DOC: index.php PERCH_DEFAULT_EXT: .php PERCH_PRODUCTION_MODE: 100 PERCH_RWD: PERCH_HTML_ENTITIES: PERCH_SSL: PERCH_STRIPSLASHES: PERCH_PROGRESSIVE_FLUSH: 1 PERCH_AUTH_PLUGIN: PERCH_DB_CHARSET: utf8 PERCH_DB_PORT: PERCH_DB_SOCKET: Hosting settings PHP: 5.5.6 Zend: 2.5.0 OS: WINNT SAPI: apache2handler Safe mode: not detected MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 40933630edef551dfaca71298a83fad8d03d62d4 $ MySQL server: 5.5.40-cll Extensions: Core, bcmath, calendar, ctype, date, ereg, filter, ftp, hash, iconv, json, mcrypt, SPL, odbc, pcre, Reflection, session, standard, mysqlnd, tokenizer, zip, zlib, libxml, dom, PDO, bz2, SimpleXML, wddx, xml, xmlreader, xmlwriter, apache2handler, openssl, curl, mbstring, exif, fileinfo, gd, gettext, intl, imap, mysql, mysqli, Phar, pdo_mysql, pdo_sqlite, soap, sockets, sqlite3, xmlrpc, xsl, mhash GD: Yes ImageMagick: No PHP max upload size: 20M PHP max form post size: 8M PHP memory limit: 256M Total max uploadable file size: 8M Resource folder writeable: Yes Session timeout: 24 minutes Native JSON: Yes Filter functions: Yes Transliteration functions: Yes MIBDIRS: /xampp/php/extras/mibs MYSQL_HOME: \xampp\mysql\bin OPENSSL_CONF: /xampp/apache/bin/openssl.cnf PHP_PEAR_SYSCONF_DIR: \xampp\php PHPRC: \xampp\php TMP: \xampp\tmp HTTP_HOST: wigan.local HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; rv:35.0) Gecko/20100101 Firefox/35.0 HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_ACCEPT_LANGUAGE: en-GB,en;q=0.5 HTTP_ACCEPT_ENCODING: gzip, deflate HTTP_REFERER: https://wigan.local/admin/core/settings/diagnostics/ HTTP_COOKIE: cmsa=1; PHPSESSID=3d9mokdk6u760hknr4udgb61e6; cmssb=1 HTTP_CONNECTION: keep-alive PATH: C:\Program Files\ImageMagick-6.8.0-Q16;C:\Program Files\ImageMagick-6.7.8-Q16;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Codebox\BitMeterOS;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Windows Live\Shared;C:\Program Files\Git\cmd;C:\Program Files\MKVToolNix;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\HashiCorp\Vagrant\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\nodejs\;C:\Ruby193\bin;C:\Program Files\Nmap;C:\Python27;C:\Users\James\AppData\Roaming\npm SystemRoot: C:\Windows COMSPEC: C:\Windows\system32\cmd.exe PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW WINDIR: C:\Windows SERVER_SIGNATURE: <address>Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6 Server at wigan.local Port 80</address> SERVER_SOFTWARE: Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6 SERVER_NAME: wigan.local SERVER_ADDR: 127.0.0.1 SERVER_PORT: 80 REMOTE_ADDR: 127.0.0.1 DOCUMENT_ROOT: C:/xampp/htdocs/FT_wiganwarriors.com REQUEST_SCHEME: http CONTEXT_DOCUMENT_ROOT: C:/xampp/htdocs/FT_wiganwarriors.com SERVER_ADMIN: postmaster@localhost SCRIPT_FILENAME: C:/xampp/htdocs/FT_wiganwarriors.com/admin/core/settings/diagnostics/index.php REMOTE_PORT: 6382 GATEWAY_INTERFACE: CGI/1.1 SERVER_PROTOCOL: HTTP/1.1 REQUEST_METHOD: GET QUERY_STRING: extended REQUEST_URI: /admin/core/settings/diagnostics/?extended SCRIPT_NAME: /admin/core/settings/diagnostics/index.php PHP_SELF: /admin/core/settings/diagnostics/index.php REQUEST_TIME_FLOAT: 1423218808.012 REQUEST_TIME: 1423218808

Any ideas?

Fishtank Creative

Fishtank Creative 2 points

  • 6 years ago

This error is displayed in the admin

https://awesomescreenshot.com/04d4cpz7e4

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does it only display on that list page? Does the edit page work ok?

What type of field is it?

Yes only appears in the list page of the admin, in the detail page there is nothing there.

It still appears on the list page, its just there is three notice errors above it. https://awesomescreenshot.com/0fa4csyl63

When I add a select field to the "Item list column IDs" I get the Notice error. If I remove the Select field (which is called injury_status) the Notice error disappears.

Drew McLellan

Drew McLellan 2638 points
Perch Support

What type of field is it?