Forum

Thread tagged as: Problem, Error, Blog

Issue with Accessing Blog in Control Panel

Hello,

In my control panel, if I attempt to navigate to Apps > Blog, I get a blank page with this error:

Fatal error: Call to a member function setSlug() on a non-object in C:\xampp\htdocs\goode2016\cms\addons\apps\perch_blog\modes\list.pre.php on line 37

Here is my diagnostics report:

PERCH INFORMATION

Perch Runway: 2.8.28
Production mode: Production (100)
Installed apps: content (2.8.28), assets (2.8.28), categories (2.8.28), perch_blog (5.0), collection_1 (2.8.28)
DB driver: PDO
DB tables: seg_backup_plans (0), seg_backup_resources (0), seg_backup_runs (0), seg_blog_authors (1), seg_blog_comments (0), seg_blog_index (0), seg_blog_posts (0), seg_blog_posts_to_tags (0), seg_blog_sections (0), seg_blog_tags (0), seg_blogs (0), seg_categories (41), seg_category_counts (0), seg_category_sets (7), seg_collection_index (2475), seg_collection_items (237), seg_collection_revisions (60), seg_collections (2), seg_content_index (1714), seg_content_items (182), seg_content_regions (44), seg_navigation (3), seg_navigation_pages (25), seg_page_routes (0), seg_page_templates (18), seg_pages (33), seg_resource_log (545), seg_resource_tags (0), seg_resources (118), seg_resources_to_tags (0), seg_settings (28), seg_user_passwords (0), seg_user_privileges (36), seg_user_role_privileges (16), seg_user_roles (2), seg_users (1)
Users: 1
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup, redactor
H1: 6f27b3b0b1ee369626196d332c3ff188
L1: dd016e185357f9839780f44f4775da15
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #b9131a
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.24: done
logoPath: /cms/resources/Goode_PrimaryLogoColor_RGB_.png
headerScheme: dark
update_runway_2.8.24: done
latest_version: 2.8.15
on_sale_version: 2.8.28
content_hideNonEditableRegions: 1
content_frontend_edit: 1
dashboard: 0
hide_pwd_reset: 0
update_runway_2.8.25: done
update_runway_2.8.26: done
perch_blog_update: 5.0.1
perch_blog_post_url: /news/post.php?s={postSlug}
update_runway_2.8.27: done
perch_blog_site_name: Goode STEM Academy
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_blog_comment_notify: 0
update_runway_2.8.28: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: C:\xampp\htdocs\goode2016\cms\setup\runway\modes
PERCH_SCHEDULE_SECRET: 7FbcMvUNis7ooooQ
PERCH_DB_USERNAME: oicp_admin04
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: seg_academy
PERCH_DB_PREFIX: seg_
PERCH_EMAIL_FROM: jlrwebdev@gmail.com
PERCH_EMAIL_FROM_NAME: Joshua Rodriguez
PERCH_LOGINPATH: /cms
PERCH_PATH: C:\xampp\htdocs\goode2016\cms
PERCH_CORE: C:\xampp\htdocs\goode2016\cms\core
PERCH_RESFILEPATH: C:\xampp\htdocs\goode2016\cms\resources
PERCH_RESPATH: /cms/resources
PERCH_HTML5: 1
PERCH_TZ: America/Chicago
PERCH_YOUTUBE_API_KEY: AIzaSyDlTEo4CIv4Yycn3c8uJvNNNtU7WUh776Y
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_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: C:\xampp\htdocs\goode2016\cms\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_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS

PHP: 5.4.16
Zend: 2.4.0
OS: WINNT
SAPI: apache2handler
Safe mode: not detected
MySQL client: mysqlnd 5.0.10 - 20111026 - $Id: e707c415db32080b3752b232487a435ee0372157 $
MySQL server: 5.5.32
Free disk space: 434.15 GB
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, gd, gettext, mysql, mysqli, Phar, pdo_mysql, pdo_sqlite, soap, sockets, sqlite3, xmlrpc, xsl, mhash
GD: Yes
ImageMagick: No
PHP max upload size: 10M
PHP max form post size: 20M
PHP memory limit: 128M
Total max uploadable file size: 10M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
MIBDIRS: C:/xampp/php/extras/mibs
MYSQL_HOME: \xampp\mysql\bin
OPENSSL_CONF: C:/xampp/apache/bin/openssl.cnf
PHP_PEAR_SYSCONF_DIR: \xampp\php
PHPRC: \xampp\php
TMP: \xampp\tmp
HTTP_HOST: goode.dev
HTTP_CONNECTION: keep-alive
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
HTTP_REFERER: https://goode.dev/cms/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: cmssb=0; cmsa=1; PHPSESSID=rbtkunu4q8aj5ls70025pcij76
PATH: C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\nodejs\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Users\Rodriguez\AppData\Roaming\npm
SystemRoot: C:\WINDOWS
COMSPEC: C:\WINDOWS\system32\cmd.exe
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR: C:\WINDOWS
SERVER_SIGNATURE: <address>Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.16 Server at goode.dev Port 80</address>
SERVER_SOFTWARE: Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.16
SERVER_NAME: goode.dev
SERVER_ADDR: 127.0.0.1
SERVER_PORT: 80
REMOTE_ADDR: 127.0.0.1
DOCUMENT_ROOT: C:/xampp/htdocs/goode2016
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: C:/xampp/htdocs/goode2016
SERVER_ADMIN: postmaster@localhost
SCRIPT_FILENAME: C:/xampp/htdocs/goode2016/cms/core/settings/diagnostics/index.php
REMOTE_PORT: 55818
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /cms/core/settings/diagnostics/?extended
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php
PHP_SELF: /cms/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1459544965.641
REQUEST_TIME: 1459544965

It was working just fine and I went into Blog > Blogs and noticed I had Blog and News added there. Which I must have done earlier trying to see if I could create a separate 'News' blog, I deleted the News and Blog Blog's listed on this page, and now i'm prompted with this error whenever I try to access Apps > Blog.

There was nothing in the blog posted yet or configured. Is it possible to completely remove the Blog app and then do a clean reinstall?

Thank you, Joshua

Joshua Rodriguez

Joshua Rodriguez 2 points

  • 5 years ago

Just realized that Andy already posted the exact same issue some hours before me, but no solution yet there either.

https://forum.grabaperch.com/forum/04-01-2016-blog-and-sections-error

Glad I'm not the only one experiencing this weird one. However, I went ahead and deleted the perch_blog folder from my apps folder, dropped all the blog tables from my database, and then reinstalled the blog app. Everything is working as expected now.

Actually, still having an issue. I went ahead and added a sample post, because I was getting a fatal error, like the following errors:

Fatal error: Call to undefined function perch_blog_categories() in C:\xampp\htdocs\goode2016\news\index.php on line 18

Fatal error: Call to undefined function perch_blog_tags() in C:\xampp\htdocs\goode2016\news\index.php on line 20

Just depends on which function comes first on my blog's index page, I continue to get this error. The rest of the page and functions are loading fine. Here's my full page:

<?php include('../cms/runtime.php');
    perch_layout('global/header');
    perch_layout('global/headernav');
?>

<!-- Begin Content -->
<div class="container page">
    <div class="sidebar col-md-4 col-lg-3">
        <h2>News</h2>
        <!-- The following functions are different ways to display archives. You can use any or all of these.
        All of these functions can take a parameter of a template to overwrite the default template, for example:
        perch_blog_categories('my_template.html');
        -->
        <!--  By category listing -->
        <?php perch_blog_categories(); ?>
        <!--  By tag -->
        <?php perch_blog_tags(); ?>
        <!--  By year -->
        <?php perch_blog_date_archive_years(); ?>
        <!--  By year and then month - can take parameters for two templates. The first displays the years and the second the months see the default templates for examples -->
        <?php perch_blog_date_archive_months(); ?>
    </div>
    <div class="col-md-8 col-lg-9">
        <h1>News</h1>
        <!-- this is an example blog homepage showing a simple call to perch_blog_recent_posts()
        Posts are displayed using the templates stored in perch/apps/perch_blog/templates/blog you can edit these as you wish, making sure that the paths used in these templates are correct for your installation. -->
        <?php
            perch_blog_recent_posts(10);
        ?>

        <p><a href="archive.php">More posts</a></p>
    </div>

<?php  
    perch_layout('global/footer'); 
    perch_layout('global/scriptsplugins');
?>

Sorry, again I think I figured this one out.

What seemed to correct everything was adding perch_blog to my apps list under config > apps.php.

$apps_list = array(
    'content', 
    'categories',
    'perch_blog',
);

All good now.