Forum

Thread tagged as: Problem, Error, Blog

Blog admin getting Server Error 500 – perch2_blogs table disappeared?

Hi,

Can't access perch blog admin area anymore. I've seen this thread https://forum.grabaperch.com/forum/12-11-2015-perch-blog-not-loading-and-getting-server-error-500 which resolves itself by adding the table perch2_blogs back into the db. I'm working locally and it seems the perch2_blogs table doesn't exist. Not being familiar with how to do such things (having tried without success) I'm not sure what I need to do.

php_error.log

PHP Fatal error:  Uncaught Error: Call to a member function setSlug() on boolean in …/perch/addons/apps/perch_blog/modes/list.pre.php:37
Stack trace:
#0 …/perch/addons/apps/perch_blog/index.php(12): include()
#1 {main}
  thrown in …/perch/addons/apps/perch_blog/modes/list.pre.php on line 37

Perch daignostics

Perch: 2.8.34
Production mode: Production (100)
Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34), perch_blog (5.0), perch_forms (1.8.3)
DB driver: PDO
DB tables: perch2_blog_authors (1), perch2_blog_comments (0), perch2_blog_index (278), perch2_blog_posts (3), perch2_blog_posts_to_tags (0), perch2_blog_sections (1), perch2_blog_tags (0), perch2_categories (6), perch2_category_counts (3), perch2_category_sets (2), perch2_content_index (2400), perch2_content_items (267), perch2_content_regions (17), perch2_forms (1), perch2_forms_responses (13), perch2_navigation (2), perch2_navigation_pages (8), perch2_page_templates (1), perch2_pages (7), perch2_resource_log (583), perch2_resource_tags (0), perch2_resources (563), perch2_resources_to_tags (0), perch2_settings (25), perch2_user_passwords (0), perch2_user_privileges (40), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (2)
Users: 2
PHPMailer: 5.2.21
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog',
        'perch_forms',
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup
H1: 421aa90e079fa326b6494f812ad13e79
L1: 073c7e467a94bad9cb28b711609a814a
F1: 6a33f95eca3667f9e0c39bf5ca2980fe
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.13: done
latest_version: 2.8.15
on_sale_version: 2.8.34
perch_blog_update: 5.0.1
perch_blog_post_url: /thinking/{postSlug}
headerScheme: light
perch_blog_slug_format: {postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_blog_comment_notify: 0
update_2.8.18: done
perch_blog_site_name: Thoughts from Daughter
logoPath: /perch/resources/daughter-logo.png
update_2.8.34: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: root
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: daughter_v5_local
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: greg@daughter.is
PERCH_EMAIL_FROM_NAME: Greg Owen
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/Daughter-Greg/Code/daughter_v5/perch
PERCH_CORE: /Users/Daughter-Greg/Code/daughter_v5/perch/core
PERCH_RESFILEPATH: /Users/Daughter-Greg/Code/daughter_v5/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_DEBUG:
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_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /Users/Daughter-Greg/Code/daughter_v5/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_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: 7.1.0
Zend: 3.1.0-dev
OS: Darwin
SAPI: apache2handler
Safe mode: not detected
MySQL client: mysqlnd 5.0.12-dev - 20150407 - $Id: d8daadaf41e3cd81d7c6ae96c6091fd15b2c9382 $
MySQL server: 5.6.34
Free disk space: 81.65 GB
Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, intl, json, ldap, mbstring, session, standard, mysqlnd, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysqli, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, apache2handler
GD: Yes
ImageMagick: No
PHP max upload size: 32M
PHP max form post size: 32M
PHP memory limit: 128M
Total max uploadable file size: 32M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
HTTP_HOST: localhost:8888
HTTP_CONNECTION: keep-alive
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_REFERER: https://localhost:8888/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch, br
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: wp-settings-1=editor%3Dhtml%26libraryContent%3Dbrowse%26hidetb%3D1; wp-settings-time-1=1478847504; __utma=111872281.255574403.1435825684.1485335599.1485340072.21; __utmc=111872281; __utmz=111872281.1461057744.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); wp-settings-3=unfold%3D0%26mfold%3Do%26editor%3Dtinymce%26libraryContent%3Dbrowse; wp-settings-time-3=1485527633; wordpress_test_cookie=WP+Cookie+check; _ga=GA1.1.255574403.1435825684; cmsa=1; SQLiteManager_currentLangue=2; PHPSESSID=476c7eb50f0fdddae6fd771456a735de
PATH: /usr/bin:/bin:/usr/sbin:/sbin
SERVER_SOFTWARE: Apache/2.2.31 (Unix) mod_wsgi/3.5 Python/2.7.12 PHP/7.1.0 mod_ssl/2.2.31 OpenSSL/1.0.2j DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.24.0
SERVER_NAME: localhost
SERVER_ADDR: ::1
SERVER_PORT: 8888
REMOTE_ADDR: ::1
DOCUMENT_ROOT: /Users/Daughter-Greg/Code/daughter_v5
SERVER_ADMIN: you@example.com
SCRIPT_FILENAME: /Users/Daughter-Greg/Code/daughter_v5/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 49304
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: 1486416403.69
REQUEST_TIME: 1486416403
argc: 1

Looks like I'm missing that all important perch2_blogs table but don't know how it disappeared, or how to get it back without re-installing everything and losing all the content, although if it comes to it, happy to go down that route.

Studio Daughter

Studio Daughter 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Was this a fresh install of Blog? When did the error start?

No it wasn't a fresh install of blog. It was all working fine. I'm not entirely sure when the issue started happening.

It may have occurred when I updated perch to the latest version when having issues logging in and it not recognising my license key. As far as I'm aware it worked before that, and that is the most recent change that would have affected perch. I updated a couple of weeks ago (doing the project in my spare time) and coming back to it this last week noticed the issue with the blog admin.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have any data in the Blog app?

Just three test posts with associated meta (which all display fine on the front end).

Drew McLellan

Drew McLellan 2638 points
Perch Support

I would be tempted to drop the blog tables and let the app reinstall itself.

I'm tempted to do the same :) I'll return with the results either way…

Bingo. Tables deleted, navigated to Apps > Blog and all is restored (minus the data).