Forum
Blog Warning Message
Hi there,
Just installed the blog app on Perch Runway. Everything is working, but i'm getting this warning message
Warning: preg_match(): Compilation failed: missing terminating ] for character class at offset 41 in /Users/Barry/Sites/extract-technology/admin/core/runway/lib/PerchRouter.class.php on line 50
(Screenshot here) - https://www.awesomescreenshot.com/image/1139318/ff99c80e7bc6caf6bf9cd55bccb3a5ba
Here is my DEBUG message on the post page
Debug Message
[12] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID ORDER BY pr.routeOrder ASC, p.pagePath ASC
Matched route: news/[blogslug:s]
Using master page: /templates/pages/news/post.php
Page arguments:
Array
(
[0] => /news/2016-03-11-extract-receives-the-workplace-wellbeing-charter-award
[s] => 2016-03-11-extract-receives-the-workplace-wellbeing-charter-award
[1] => 2016-03-11-extract-receives-the-workplace-wellbeing-charter-award
)
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch2_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='2016-03-11-extract-receives-the-workplace-wellbeing-charter-award')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2016-04-05 10:34:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 10
[1] SELECT FOUND_ROWS() AS `count`
[23] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] Using template: /addons/apps/perch_blog/templates/blog/meta_head.html
[2] SELECT * FROM perch2_blog_authors ORDER BY authorFamilyName, authorGivenName ASC
[1] SELECT * FROM perch2_blog_sections ORDER BY sectionTitle ASC
[1] SELECT * FROM perch2_blogs ORDER BY blogTitle ASC
[23] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[3] SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 AND pageDepth >=0 AND pageDepth<=1 ORDER BY pageTreePosition ASC
[1] SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/news/post' LIMIT 1
[2] SELECT pageID FROM perch2_pages WHERE pageTreePosition IN ('000-004-001', '000-004', '000') ORDER BY pageTreePosition DESC
[3] Using template: /templates/navigation/item.html
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch2_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='2016-03-11-extract-receives-the-workplace-wellbeing-charter-award')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2016-04-05 10:34:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 10
[1] SELECT FOUND_ROWS() AS `count`
[1] Using template: /templates/blog/post.html
[1] SELECT * FROM perch2_categories ORDER BY catTreePosition ASC
Fetching from cache: perch_blog_author_for_postca1180612ef7f80ecd033d2ffe66a0bb
Fetching from cache: perch_blog_post_categories069545a666e838d724cbb6995ef91b09
Fetching from cache: perch_blog_post_tags279a45551f3b9fef48220457fd00bee4
Cache file not found: perch_blog_post_tags279a45551f3b9fef48220457fd00bee4
[1] SELECT * FROM perch2_blog_posts WHERE postStatus='Published' AND postDateTime<='2016-04-05 10:34:00' AND postSlug='2016-03-11-extract-receives-the-workplace-wellbeing-charter-award'
[nil] SELECT t.* FROM perch2_blog_tags t, perch2_blog_posts_to_tags p2t WHERE t.tagID=p2t.tagID AND p2t.postID='95'
[] Using template: /templates/blog/post_tag_link.html
[nil] SELECT * FROM perch2_blog_comments WHERE 1=1 AND postID=95 AND commentStatus='LIVE' ORDER BY commentDateTime ASC
[] Using template: /addons/apps/perch_blog/templates/blog/comment.html
[1] SELECT * FROM perch2_blog_posts WHERE postID=95 AND postStatus='Published' AND postDateTime<='2016-04-05 10:34:00'
Using template: /addons/apps/perch_blog/templates/blog/comment_form.html
Fetching from cache: perch_blog_categories589c7a634eb12f2ec225cfedc7dc78ae
Fetching from cache: perch_blog_tagse0b2ff59ed95ac2a35516ee8013c2dd2
Fetching from cache: perch_blog_date_archive_years06b1ec41355f83614225087b92313523
Fetching from cache: perch_blog_date_archive_monthsf2e7d49784704a5b24102a78c349d57c
Request time: 0.0992
Process time: 0.0975
Memory: 5.6531
Array
(
[type] => 2
[message] => preg_match(): Compilation failed: missing terminating ] for character class at offset 41
[file] => /Users/Barry/Sites/extract-technology/admin/core/runway/lib/PerchRouter.class.php
[line] => 50
)
Here is my DR
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), perch_forms (1.8.3)
DB driver: PDO
DB tables: perch2_backup_plans (0), perch2_backup_resources (0), perch2_backup_runs (0), perch2_blog_authors (2), perch2_blog_comments (0), perch2_blog_index (2204), perch2_blog_posts (92), perch2_blog_posts_to_tags (12), perch2_blog_sections (1), perch2_blog_tags (12), perch2_blogs (1), perch2_categories (8), perch2_category_counts (8), perch2_category_sets (1), perch2_collection_index (0), perch2_collection_items (0), perch2_collection_revisions (0), perch2_collections (0), perch2_content_index (3), perch2_content_items (2), perch2_content_regions (5), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_routes (7), perch2_page_templates (11), perch2_pages (7), perch2_resource_log (3), perch2_resource_tags (0), perch2_resources (0), perch2_resources_to_tags (0), perch2_settings (23), perch2_user_passwords (0), perch2_user_privileges (37), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (1)
Users: 1
App runtimes:
<?php
$apps_list = array(
'content',
'categories',
'perch_forms',
'perch_blog',
);
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup
H1: 4d426b77778122f98248714c235035bc
L1: 3c899acaaed58d00d7605554a4d559dc
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #000000
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.8.28: done
headerScheme: dark
update_runway_2.8.28: done
latest_version: 2.8.15
on_sale_version: 2.8.28
perch_blog_update: 5.0.1
perch_blog_post_url: /news/{postSlug}
perch_blog_site_name:
perch_blog_slug_format: %Y-%m-%d-{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
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /Users/Barry/Sites/extract-technology
PERCH_SCHEDULE_SECRET: a6Kul7kfXIL7U5I2
PERCH_DB_USERNAME: teamfcuk_extract
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: teamfcuk_extractrun
PERCH_DB_PREFIX: perch2_
PERCH_EMAIL_FROM: barry@teamfc.co.uk
PERCH_EMAIL_FROM_NAME: Barry Corrigan
PERCH_LOGINPATH: /admin
PERCH_PATH: /Users/Barry/Sites/extract-technology/admin
PERCH_CORE: /Users/Barry/Sites/extract-technology/admin/core
PERCH_RESFILEPATH: /Users/Barry/Sites/extract-technology/admin/resources
PERCH_RESPATH: /admin/resources
PERCH_HTML5: 1
PERCH_TZ: UTC
PERCH_DEBUG: 1
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_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /Users/Barry/Sites/extract-technology/admin/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.6.10
Zend: 2.6.0
OS: Darwin
SAPI: apache2handler
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $
MySQL server: 5.5.42
Free disk space: 700.13 GB
Extensions: Core, date, ereg, 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, mysqli, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysql, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, apache2handler, imap, gettext, mcrypt, yaz, pgsql, pdo_pgsql, xdebug
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: extract.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 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.57 Safari/537.36
HTTP_REFERER: https://extract.dev/admin/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8,fr;q=0.6
HTTP_COOKIE: cmsa=1; cmssb=0; PHPSESSID=32b72f66e744e2a6eeb23169f32f599e
PATH: /usr/bin:/bin:/usr/sbin:/sbin
SERVER_SOFTWARE: Apache
SERVER_NAME: extract.dev
SERVER_ADDR: ::1
SERVER_PORT: 80
REMOTE_ADDR: ::1
DOCUMENT_ROOT: /Users/Barry/Sites/extract-technology
SERVER_ADMIN: you@example.com
SCRIPT_FILENAME: /Users/Barry/Sites/extract-technology/admin/core/settings/diagnostics/index.php
REMOTE_PORT: 55942
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /admin/core/settings/diagnostics/?extended
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
PHP_SELF: /admin/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1459852593.06
REQUEST_TIME: 1459852593
argc: 1
Any ideas?
What does the offending route look like?
On the Post master page its
news/[blogslug:s]
Is the
blogslug
custom token defined in yourrunway.php
file?Yes, but initially it wasn't added. It was done at a later date. If that helps.
Can you try re-saving the route now that it's in place? The routes get compiled when they're saved - that might not have worked if the token was missing.