Forum

Thread tagged as: Problem, Error, Blog

Perch Blog 5.0 - Fatal Error after installation

Hi,

I have just updated a client site to Perch 2.8.15 and then installed the new Blog 5.0 App

but I get this when I try to access the Blog App

Fatal error: Call to a member function setSlug() on a non-object in /var/sites/a/************/public_html/site_admin/addons/apps/perch_blog/modes/list.pre.php on line 37

Anyone else get this?

Neil Duddridge

Neil Duddridge 1 points

  • 5 years ago

Diag report as follows:


PERCH INFORMATION Perch: 2.8.15 Production mode: Production (100) Installed apps: content (2.8.15), assets (2.8.15), categories (2.8.15), perch_blog (5.0) DB driver: PDO DB tables: 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_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: ckeditor, markitup H1: 1b2892007ca8c60f4e162f304fd27831 L1: fffb6a681a281b0ae6887f514168c635 headerColour: #515151 content_singlePageEdit: 1 helpURL: siteURL: / hideBranding: 1 content_collapseList: 1 lang: en-gb update_2.8.2: done latest_version: 2.8.15 on_sale_version: 2.8.15 headerScheme: dark dashboard: 1 hide_pwd_reset: 0 content_hideNonEditableRegions: 0 content_frontend_edit: 0 update_2.8.3: done perch_blog_post_url: /blog/post.php?s={postSlug} perch_blog_slug_format: %Y-%m-%d-{postTitle} perch_blog_akismet_key: perch_blog_max_spam_days: 0 perch_blog_comment_notify: 0 logoPath: perch_blog_update: 5.0.1 update_2.8.15: done perch_blog_site_name: xxxxxx PERCH_DEVELOPMENT: 10 PERCH_STAGING: 50 PERCH_PRODUCTION: 100 PERCH_DB_USERNAME: xxxxxx_cms PERCH_DB_SERVER: 10.168.1.92 PERCH_DB_DATABASE: xxxxx_cms PERCH_DB_PREFIX: perch2_ PERCH_TZ: UTC PERCH_EMAIL_FROM: xxxx PERCH_EMAIL_FROM_NAME: xxxx PERCH_LOGINPATH: /xxxxxx PERCH_PATH: /var/sites/a/xxxxxx/public_html/xxxx PERCH_CORE: /var/sites/a/xxxxxx/public_html/xxxx/core PERCH_RESFILEPATH: /var/sites/a/xxxxxxx/public_html/xxxxx/resources PERCH_RESPATH: /xxxxxx/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: /var/sites/a/xxxxxx/public_html/xxxxxx/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: PERCH_SESSION_TIMEOUT_MINS: 20 HOSTING SETTINGS PHP: 5.5.26 Zend: 2.5.0 OS: Linux SAPI: cgi-fcgi Safe mode: not detected MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $ MySQL server: 5.6.21 Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, session, json, ldap, mbstring, mcrypt, mssql, standard, mysql, mysqlnd, mysqli, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, imap, SimpleXML, soap, sockets, exif, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, memcache, geoip, mhash, ionCube Loader GD: Yes ImageMagick: No PHP max upload size: 100M PHP max form post size: 100M PHP memory limit: 128M Total max uploadable file size: 100M Resource folder writeable: Yes Session timeout: 240 minutes Native JSON: Yes Filter functions: Yes Transliteration functions: No DOCUMENT_ROOT: /var/sites/a/xxxxxxx/public_html GATEWAY_INTERFACE: CGI/1.1 HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 HTTP_ACCEPT_ENCODING: gzip, deflate, sdch HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8 HTTP_CONNECTION: close HTTP_COOKIE: phpbb3_3lkb3_u=1; phpbb3_3lkb3_k=; phpbb3_3lkb3_sid=aa1f444d910829c3924e586c0ac7404d; phpbb3_g26k7_u=2; phpbb3_g26k7_k=; phpbb3_g26k7_sid=bdc09ad47b835e59745c8e5ec031f8bb; __utma=108869074.1260398506.1444165947.1447289315.1447294002.8; __utmc=108869074; __utmz=108869074.1444165947.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __atuvc=0%7C41%2C17%7C42%2C0%7C43%2C8%7C44%2C8%7C45; cmsa=1; PHPSESSID=64516a215d473c23bde73a54801badac HTTP_HOST: xxxxxx HTTP_REFERER: https://xxxxxxx/xxxxxxx/core/settings/diagnostics/ HTTP_UPGRADE_INSECURE_REQUESTS: 1 HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36 HTTP_X_FORWARDED_FOR: 82.3.209.205 PATH: /bin QUERY_STRING: extended REDIRECT_STATUS: 200 REMOTE_ADDR: 82.3.209.205 REMOTE_PORT: 6189 REQUEST_METHOD: GET REQUEST_URI: /xxxxx/core/settings/diagnostics/?extended SCRIPT_FILENAME: /var/sites/a/xxxxxxxx/public_html/xxxxxx/core/settings/diagnostics/index.php SCRIPT_NAME: /xxxxxx/core/settings/diagnostics/index.php SERVER_ADDR: 10.168.1.228 SERVER_ADMIN: you@example.com SERVER_NAME: xxxxxxxx SERVER_PORT: 80 SERVER_PROTOCOL: HTTP/1.1 SERVER_SOFTWARE: Apache PHP_SELF: /xxxxxxxx/core/settings/diagnostics/index.php REQUEST_TIME_FLOAT: 1447454927.35 REQUEST_TIME: 1447454927 argc: 1
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Which version did you upgrade from?

Can you show me your blog post template?

It's the default blog post template - whilst the app was installed in the CMS previously it was something never setup for the client

I was upgrading from Perch 2.8.3 an Blog 4.6

<article class="h-entry">
    <h1>
        <a href="<perch:blog id="postURL" type="hidden" />" rel="bookmark" class="p-name">
            <perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" />
        </a>
    </h1>
    <p class="meta">
        <time class="dt-published" datetime="<perch:blog id="postDateTime" type="date" label="Date" time="true" format="Y-m-d H:i:s" divider-before="Publishing" />">
            <perch:blog id="postDateTime" type="date" time="true" format="%d %B %Y" /> 
        </time>
        <perch:if exists="authorGivenName">
            by <span class="p-author h-card"><perch:blog id="authorGivenName" type="hidden" /> <perch:blog id="authorFamilyName" type="hidden" /></span>
        </perch:if>    
        <perch:categories id="categories" set="blog" label="Categories" display-as="checkboxes">
            <a href="archive.php?cat=<perch:category id="catSlug" type="slug" />" class="p-category">
                <perch:category id="catTitle" type="text" />
            </a>
        </perch:categories>

    </p>
    <perch:if exists="image">
        <div>
            <img src="<perch:blog id="image" type="image" width="320" height="240" crop="true" label="Image" order="4" />" alt="<perch:blog id="postTitle" />" />
        </div>
    </perch:if>
    <div class="description e-content">
        <perch:blog id="postDescHTML" type="textarea" label="Post" order="2" editor="markitup" markdown="true" size="xxl autowidth" required="true" />
    </div>
</article>

<perch:blog id="excerpt" type="textarea" label="Excerpt" markdown="true" order="3" suppress="true" size="s" />
<perch:blog id="image" type="image" width="50" height="50" crop="true" suppress="true" />

Drew McLellan

Drew McLellan 2638 points
Perch Support

Looks like you're missing some tables. Can you try going to:

https://xxxxxxx/xxxxxxx/addons/apps/perch_blog/update

Ok, just tried that but it still returns the same error

Drew McLellan

Drew McLellan 2638 points
Perch Support

Did the update cycle through your posts?

There were no posts as the blog hadn't been used.

However, I have since corrected the issue by deleting the perch_blog tables in the database and perch_blog_update record in the perch_settings table, logged back into Perch and the error is no longer showing. So something must have gone wrong during the db update initially.