Forum

Thread tagged as: Question, Problem, Error

Perch content error

Updated a Perch installation, now when going to edit core content, getting the following error:

Warning: Invalid argument supplied for foreach() in /perch/core/apps/content/modes/edit.form.post.php on line 150

Tony Brooks

Tony Brooks 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That error suggests that no template tags have been found in your template. Could you post your template?

<perch:content id="text" type="textarea" label="Text" html="true" editor="ckeditor" />
Drew McLellan

Drew McLellan 2638 points
Perch Support

That's the entire template?

Yeah - it's just a text block.

Updated from 2.4.6, replace core folder, added categories to app list. Updated CKEditor, and Markitup.

Drew McLellan

Drew McLellan 2638 points
Perch Support

What sort of region is it? Does the field display?

Yeah, displays. I enter the text, hit save, then get that. And the contents of the field aren't saved.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is it a single item region?

Does the same occur with any other regions, or with a new region?

Single item region. All regions, including an image region. Just blanks out, and gives me that error.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you post your diagnostics report?

Perch: 2.8.4
Production mode: Production (100)
Installed apps: content (2.8.4), assets (2.8.4), categories (2.8.4), perch_blog (4.6)
DB driver: PDO
DB tables: perch2_blog_authors, perch2_blog_categories, perch2_blog_comments, perch2_blog_index, perch2_blog_posts, perch2_blog_posts_to_categories, perch2_blog_posts_to_tags, perch2_blog_sections, perch2_blog_tags, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_navigation, perch2_navigation_pages, 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: 2
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories', 
        'perch_blog'
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup, ckeditor
H1: 9b8e2961b22187df26a44d9b795b6af5
L1: 9a19df0f5a68d978717cb6b4a4136d4b
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.5.4: done
latest_version: 2.8
on_sale_version: 2.8.4
perch_blog_post_url: /blog/post.php?s={postSlug}
perch_blog_update: 5.0
update_2.8.4: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: jwroofing
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: jwroofing
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: tony@indesignonline.co.uk
PERCH_EMAIL_FROM_NAME: Tony Brooks
PERCH_LOGINPATH: /perch
PERCH_PATH: /**PATH**/perch
PERCH_CORE: /**PATH**/perch/core
PERCH_RESFILEPATH: /**PATH**/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_RUNWAY:
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: /**PATH**/perch/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.4.39
Zend: 2.4.0
OS: Linux
SAPI: apache2handler
Safe mode: not detected
MySQL client: 5.5.43
MySQL server: 5.5.43
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bz2, calendar, ctype, hash, filter, ftp, gettext, SPL, iconv, Reflection, session, standard, shmop, SimpleXML, sockets, mbstring, tokenizer, xml, apache2handler, bcmath, curl, dom, fileinfo, gd, gmp, imap, json, exif, mcrypt, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, Phar, sqlite3, wddx, xmlreader, xmlwriter, xsl, zip, mhash, ionCube Loader
GD: Yes
ImageMagick: No
PHP max upload size: 128M
PHP max form post size: 8M
PHP memory limit: 128M
Total max uploadable file size: 8M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
PP_CUSTOM_PHP_INI: /**PATH**/etc/php.ini
PP_CUSTOM_PHP_CGI_INDEX: module
HTTP_HOST: /**HOST**/
HTTP_CONNECTION: keep-alive
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
HTTP_REFERER: /**PATH**/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: PHPSESSID=tl252b3rgg3fjm3acdvool8de7; cmsa=1
PATH: /sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE: <address>Apache Server at jwroofing.live-build.co.uk Port 80</address>
SERVER_SOFTWARE: Apache
SERVER_NAME: /**SNAME**/
SERVER_ADDR: 37.122.211.33
SERVER_PORT: 80
REMOTE_ADDR: 212.159.151.34
DOCUMENT_ROOT: /**PATH**/
SERVER_ADMIN: info@indesignonline.co.uk
SCRIPT_FILENAME: /**PATH**/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 54444
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1429262256.048
REQUEST_TIME: 1429262256
Drew McLellan

Drew McLellan 2638 points
Perch Support

How are you deploying your site?

Just standard, PHP, uploaded to root. No complex stuff.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you try reuploading? It's such a strange error that I'm wondering if you've somehow got a mix of old and new files.

I've re-uploaded core twice. And just re-uploaded the whole of Perch, merging the folders.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Did you say it's working in your dev environment or not?

It's a dev environment in itself. Just our testing domain.

I've just used an older version of perch, worked fine. Something to do with the jump in versions.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you turn on debug, what does it output?