Forum
Blog reverting to default template?
Hi
Debug shows I'm using this (correct) template.
Using template: /templates/blog/en/post.html
When I save changes in the Meta and Social tab, the template reverts back to the default template?
Using template: /addons/apps/perch_blog/templates/blog/post.html
Here's a 39 second video showing the problem.
Summary
Perch Runway: 3.1.1, PHP: 7.1.12, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $, with PDO
Server OS: Darwin, cgi-fcgi
Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_blog (5.6.1), perch_forms (1.11)
App runtimes: <?php $apps_list = [ 'perch_forms', 'perch_blog' ];
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/stephen/Repositories/project-name/cms/perch
PERCH_CORE: /Users/stephen/Repositories/project-name/cms/perch/core
PERCH_RESFILEPATH: /Users/stephen/Repositories/project-name/cms/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /Users/stephen/Repositories/project-name/cms
HTTP_HOST: project-name.local
Extended Perch information
Perch Runway: 3.1.1
Production mode: Production (100)
Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_blog (5.6.1), perch_forms (1.11)
DB driver: PDO
DB tables: perch3_backup_plans (0), perch3_backup_resources (0), perch3_backup_runs (0), perch3_blog_authors (1), perch3_blog_comments (0), perch3_blog_index (1161), perch3_blog_posts (17), perch3_blog_posts_to_tags (0), perch3_blog_sections (1), perch3_blog_tags (0), perch3_blog_webmention_queue (0), perch3_blogs (2), perch3_categories (98), perch3_category_counts (10), perch3_category_sets (10), perch3_collection_index (1841), perch3_collection_items (269), perch3_collection_revisions (66), perch3_collections (6), perch3_content_index (1498), perch3_content_items (768), perch3_content_locks (0), perch3_content_regions (276), perch3_forms (2), perch3_forms_responses (7), perch3_menu_items (11), perch3_navigation (4), perch3_navigation_pages (19), perch3_page_routes (81), perch3_page_templates (28), perch3_pages (121), perch3_resource_log (949), perch3_resource_tags (0), perch3_resources (108), perch3_resources_to_tags (0), perch3_settings (33), perch3_user_passwords (0), perch3_user_privileges (42), perch3_user_role_buckets (14), perch3_user_role_privileges (38), perch3_user_roles (3), perch3_users (3)
Users: 3
App runtimes:
<?php
$apps_list = [
'perch_forms',
'perch_blog'
];
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins), publish_posts (1 mins), process_webmentions (1 mins)
Editor plug-ins:
H1: ee2bfe41a4a46fb94f7e9cc9fa1950b4
L1: 1be6e0eb2a58b4bad0f7b6828f6471f8
F1: 3b606135b33e6a102526838f4152a807
headerColour: #000000
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
installedAt: 3.0.14
update_3.0.14: done
headerScheme: dark
update_runway_3.0.14: done
latest_version:
on_sale_version: 3.1.1
update_runway_3.1.1: done
dashboard: 0
sidebar_back_link: 0
hide_pwd_reset: 0
keyboardShortcuts: 0
siteOffline: 0
content_hideNonEditableRegions: 1
content_frontend_edit: 0
content_skip_region_list: 0
assets_restrict_buckets: 0
perch_blog_update: 5.6
perch_blog_post_url: /en/news/{postSlug}
perch_blog_site_name:
perch_blog_slug_format: {postTitle}-%Y-%m-%d
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_blog_comment_notify: 0
perch_blog_webmention_tx: 0
perch_blog_webmention_rx: 0
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /Users/stephen/Repositories/project-name/cms
PERCH_SCHEDULE_SECRET: XXXXXXXXX
PERCH_DB_USERNAME: root
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: project_local_
PERCH_DB_PREFIX: perch3_
PERCH_EMAIL_FROM: email@demo.com
PERCH_EMAIL_FROM_NAME: Project Name
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/stephen/Repositories/project-name/cms/perch
PERCH_CORE: /Users/stephen/Repositories/project-name/cms/perch/core
PERCH_RESFILEPATH: /Users/stephen/Repositories/project-name/cms/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_TZ: UTC
PERCH_RWD: 1
PERCH_YOUTUBE_API_KEY: XXXXXXXXX
PERCH_DEBUG: 1
PERCH_EMAIL_METHOD: smtp
PERCH_EMAIL_HOST: smtp.mailtrap.io
PERCH_EMAIL_SECURE: tls
PERCH_EMAIL_AUTH: 1
PERCH_EMAIL_PORT: 2525
PERCH_EMAIL_USERNAME: XXXXXXXXXXXX
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_ASSET_VERSION: 8255e4c4a367cfa3e2bd
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /Users/stephen/Repositories/project-name/cms/perch/templates
PERCH_TEMPLATE_FILTERS:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_XHTML_MARKUP:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_DEFAULT_BUCKET: default
PERCH_TRANSLATION_ASSIST:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_PRIV_ASSIST:
PERCH_CUSTOM_EDITOR_CONFIGS:
PERCH_ENABLE_EXIF: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown
Hosting settings
PHP: 7.1.12
Zend: 3.1.0
OS: Darwin
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $
MySQL server: 5.6.38
Free disk space: 48.83 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, readline, Reflection, mysqli, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, imap, gettext, mcrypt, pgsql, pdo_pgsql, igbinary, memcached
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
PHP_FCGI_CHILDREN: 4
PWD: /Applications/MAMP/fcgi-bin
PHP_FCGI_MAX_REQUESTS: 200
__CF_USER_TEXT_ENCODING: 0x1F5:0x0:0x2
ORIG_SCRIPT_NAME: /fcgi-bin/php7.1.12.fcgi
ORIG_PATH_TRANSLATED: /Users/stephen/Repositories/project-name/cms/perch/core/settings/diagnostics/index.php
ORIG_PATH_INFO: /perch/core/settings/diagnostics/index.php
ORIG_SCRIPT_FILENAME: /Applications/MAMP/fcgi-bin/php7.1.12.fcgi
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.1
GATEWAY_INTERFACE: CGI/1.1
REDIRECT_URL: /perch/core/settings/diagnostics/index.php
REDIRECT_QUERY_STRING: extended
REMOTE_PORT: 59076
SCRIPT_FILENAME: /Users/stephen/Repositories/project-name/cms/perch/core/settings/diagnostics/index.php
SERVER_ADMIN: you@example.com
DOCUMENT_ROOT: /Users/stephen/Repositories/project-name/cms
REMOTE_ADDR: ::1
SERVER_PORT: 80
SERVER_ADDR: ::1
SERVER_NAME: project-name.local
SERVER_SOFTWARE: Apache
PATH: /usr/bin:/bin:/usr/sbin:/sbin
HTTP_COOKIE: cmsa=1; PHPSESSID=91c65fea060344d802a83ec112f7ec61
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.9
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_REFERER: https://project-name.local/perch/core/settings/diagnostics/
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
HTTP_DNT: 1
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_CONNECTION: keep-alive
HTTP_HOST: project-name.local
REDIRECT_STATUS: 200
REDIRECT_HANDLER: php-fastcgi
FCGI_ROLE: RESPONDER
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1531682071.32
REQUEST_TIME: 1531682071
argc: 1
Hi Stephen,
I had the exact same issue with multiple language blogs (https://forum.grabaperch.com/forum/04-12-2017-problem-showing-categories-with-multiple-blogs-and-default-post-template-issues) and it was resolved by having all alternative post templates in the blog/posts folder.
Hi Simon,
Thanks for the tip.
I've been able to recreate the workaround that you discovered, but unfortunately that's all it is - a workaround to a problem that you found last year. It's disappointing it's not been fixed.
Drew,
The site I'm working on currently has two blogs, English and German (but it could have more). The post template should be set based on the blog selected - which it is - but unfortunately it reverts back to the default template when the meta tab is saved (see video above).
The workaround adds an extra step for the user to take. Select the blog, then select the post template. The user shouldn't have to do that.
Can we expect a fix for this?
Hi,
Just wondering if this has been looked at? Is it considered a bug? Is it likely to be fixed?
I need to hand a website (with this problem) over to a client tomorrow, I don't expect a fix by then, but can I give them an idea of when this is likely to be resolved?
Hi,
Really sorry for bumping this again.
Is it likely the upcoming meta and social update using "extended properties/field groups" will fix this?
If so, can you give me some idea when we can expect this?
I need to tell my client something, in their mind the whole site is broken (of course it isn't) but it looks bad as I recommended Perch.
Hi Stephen,
Did you try placing the master template directly in
templates/blog
instead of/templates/blog/en
?So you can have
templates/blog/post_en.html
for example.Hi Hussein,
I should have mentioned in my last post, I've already tried that. Unfortunatley, it doesn't make a difference. Thanks for trying to help.
I know a replacement to the Meta and Social tab is in development, I'm hoping this issue, and another will be resolved when it's released.
It'd be much appreciated if official Perch support could shine some light on this.
Yes, it's all the same core issue.