Forum

Thread tagged as: Error

Undefined variable notice from Core in upgraded Perch install

Hi there

Notice: Undefined variable: details in /SITEPATH-REDACTED/perch/core/apps/content/modes/region.options.post.php on line 11

I've just updated a client site to Perch 3.0.8 from 2.xx and I am seeing this php notice in the header for a particular region – in the editing region page. It's a list/detail page setup. If I turn on "edit all on one page" the warning goes away.

I am not seeing this warning on another list/detail page setup on the same site.

Diagnostics


Viewing diagnostic information Basic Extended Add-ons Update Health check PHP 7.0.15 is up to date MySQL 5.6.35 is up to date Image processing available Summary information Perch: 3.0.8, PHP: 7.0.15, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $, with PDO Server OS: Darwin, apache2handler Installed apps: content (3.0.8), assets (3.0.8), categories (3.0.8) App runtimes: <?php $apps_list = [ ]; PERCH_LOGINPATH: /perch PERCH_PATH: /Users/ellimondo/Dropbox/Sites/absolutesg/dev.absolutesg.co.uk/perch PERCH_CORE: /Users/ellimondo/Dropbox/Sites/absolutesg/dev.absolutesg.co.uk/perch/core PERCH_RESFILEPATH: /Users/ellimondo/Dropbox/Sites/absolutesg/dev.absolutesg.co.uk/perch/resources Image manipulation: GD PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7 Resource folder writeable: Yes HTTP_HOST: dev.absolutesg.co.uk DOCUMENT_ROOT: /Users/ellimondo/Dropbox/Sites/absolutesg/dev.absolutesg.co.uk REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Debug message

Debug Message - Perch 3.0.8
[1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='46bf2ae4bf48e7fc167757e06a6d0494' LIMIT 1
UPDATE perch2_users SET userHash='3056dfe9403be0942412f8abf15f483f' WHERE userID='1'
[28] SELECT p.privKey FROM perch2_user_privileges p
[21] SELECT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID ASC
[6] SELECT itemValue FROM perch2_menu_items WHERE itemType='app'
[1] SELECT * FROM perch2_content_regions WHERE regionID=19 LIMIT 1
[1] SELECT * FROM perch2_pages WHERE pageID=7 LIMIT 1
Using template: /templates/content/project_content_detail.html
[11] SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_content_items c WHERE c.regionID=19 AND c.itemRev=114 ORDER BY c.itemOrder ASC
[1] SELECT * FROM perch2_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 0, 1
[1] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=1 ORDER BY mi.itemOrder ASC
[1] SELECT itemTitle FROM perch2_menu_items WHERE itemType='app' AND itemValue='content' LIMIT 1
[1] SELECT * FROM perch2_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 1, 10
[2] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=2 ORDER BY mi.itemOrder ASC
File: /core/apps/content/modes/region.itemlist.post.php
Mode: region.itemlist
Queries: 14
Memory: 3.2746
Array
(
    [type] => 8
    [message] => Undefined variable: details
    [file] => /Users/ellimondo/Dropbox/Sites/absolutesg/dev.absolutesg.co.uk/perch/core/apps/content/modes/region.itemlist.post.php
    [line] => 11
)
Jonathan Elliman

Jonathan Elliman 27 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you experiencing any problems as a result?

None at all Drew. Just thought I'd log it with you.

Jon

Drew McLellan

Drew McLellan 2638 points
Perch Support

Thanks!

A quick update to this logged warning, in the fact that I've identified where it occurs:

If anything is entered into the field "URL for single items" in the region options then the warning appears. It disappears again if the field content is deleted.

Again, I am not experiencing any problems, just a log.

Kind regards

Jon

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is this 3.0.9?

Yep, Perch 3.0.9, no apps installed:

    Perch: 3.0.9, PHP: 7.0.20, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $, with PDO
    Server OS: Darwin, apache2handler
    Installed apps: content (3.0.9), assets (3.0.9), categories (3.0.9)
    App runtimes: <?php $apps_list = [ ];
    PERCH_LOGINPATH: /perch
    PERCH_PATH: /Users/ellimondo/Dropbox/Sites/absolutesg/dev.absolutesg.co.uk/perch
    PERCH_CORE: /Users/ellimondo/Dropbox/Sites/absolutesg/dev.absolutesg.co.uk/perch/core
    PERCH_RESFILEPATH: /Users/ellimondo/Dropbox/Sites/absolutesg/dev.absolutesg.co.uk/perch/resources
    Image manipulation: GD
    PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
    F1: 3b606135b33e6a102526838f4152a807
    Resource folder writeable: Yes
    HTTP_HOST: dev.absolutesg.co.uk
    DOCUMENT_ROOT: /Users/ellimondo/Dropbox/Sites/absolutesg/dev.absolutesg.co.uk
    REQUEST_URI: /perch/core/settings/diagnostics/
    SCRIPT_NAME: /perch/core/settings/diagnostics/index.php