Forum

Thread tagged as: Blog

Blog: Categories disappear when meta is saved?

Hi,

I'm using this code to output a list of categories:

<?php perch_blog_categories([
    'set' => 'news',
    'template' => 'elements/news--categories.html'
]); ?>

All my categories are listed, until I press save in the 'meta and social' tab (I want to use tags).

The category is removed from my categories list, until I go back to the post and re-save.

Is this a known issue?

Here's a video showing the issue

https://recordit.co/sw7KmDimzI

Health check

  • Perch Runway is up to date
  • PHP 7.0.22 is up to date
  • MySQL 5.6.35 is up to date
  • Image processing available
Stephen Meehan

Stephen Meehan 4 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you post your diagnostics report please?

Sure,

Perch Runway LTM: 3.0.14
Production mode: Production (100)
Installed apps: content (3.0.14), assets (3.0.14), categories (3.0.14), perch_blog (5.6.1), perch_forms (1.10)
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 (201), perch3_blog_posts (4), perch3_blog_posts_to_tags (5), perch3_blog_sections (1), perch3_blog_tags (6), perch3_blog_webmention_queue (0), perch3_blogs (2), perch3_categories (4), perch3_category_counts (4), perch3_category_sets (2), perch3_collection_index (0), perch3_collection_items (0), perch3_collection_revisions (0), perch3_collections (0), perch3_content_index (1076), perch3_content_items (162), perch3_content_locks (0), perch3_content_regions (38), perch3_forms (1), perch3_forms_responses (2), perch3_menu_items (10), perch3_navigation (1), perch3_navigation_pages (1), perch3_page_routes (7), perch3_page_templates (24), perch3_pages (13), perch3_resource_log (91), perch3_resource_tags (0), perch3_resources (46), perch3_resources_to_tags (0), perch3_settings (31), perch3_user_passwords (0), perch3_user_privileges (40), perch3_user_role_buckets (0), perch3_user_role_privileges (2), perch3_user_roles (2), perch3_users (1)
Users: 1
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: 8eff8ddf9904b33308a147611948f861
L1: e03588fcdc53090997fbd51252fbb378
F1: 3b606135b33e6a102526838f4152a807
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
installedAt: 3.0.14
update_3.0.14: done
headerColour: #000000
headerScheme: dark
update_runway_3.0.14: done
latest_version:
on_sale_version: 3.0.14
perch_blog_update: 5.6
perch_blog_post_url: /{blogSlug}/{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
sidebar_back_link: 0
hide_pwd_reset: 0
keyboardShortcuts: 0
siteOffline: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
content_skip_region_list: 0
assets_restrict_buckets: 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/burgess-hill/cms
PERCH_SCHEDULE_SECRET: jg3pTtJ6Dovxvhvl
PERCH_DB_USERNAME: root
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: burgess-hill-local_
PERCH_DB_PREFIX: perch3_
PERCH_EMAIL_FROM: XXXXXXX
PERCH_EMAIL_FROM_NAME: Stephen Meehan
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/stephen/Repositories/burgess-hill/cms/perch
PERCH_CORE: /Users/stephen/Repositories/burgess-hill/cms/perch/core
PERCH_RESFILEPATH: /Users/stephen/Repositories/burgess-hill/cms/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_TZ: UTC
PERCH_DEBUG: 1
PERCH_EMAIL_METHOD: smtp
PERCH_EMAIL_HOST: mailtrap.io
PERCH_EMAIL_SECURE: tls
PERCH_EMAIL_AUTH: 1
PERCH_EMAIL_PORT: 2525
PERCH_EMAIL_USERNAME: 48796d243f6bd3625
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: f704e7442d11292c99b5
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /Users/stephen/Repositories/burgess-hill/cms/perch/templates
PERCH_TEMPLATE_FILTERS:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_XHTML_MARKUP:
PERCH_RWD: 1
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.0.22
Zend: 3.0.0
OS: Darwin
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
MySQL server: 5.6.35
Free disk space: 45.11 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, 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.0.22.fcgi
ORIG_PATH_TRANSLATED: /Users/stephen/Repositories/burgess-hill/cms/perch/core/settings/diagnostics/index.php
ORIG_PATH_INFO: /perch/core/settings/diagnostics/index.php
ORIG_SCRIPT_FILENAME: /Applications/MAMP/fcgi-bin/php7.0.22.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: 54685
SCRIPT_FILENAME: /Users/stephen/Repositories/burgess-hill/cms/perch/core/settings/diagnostics/index.php
SERVER_ADMIN: you@example.com
DOCUMENT_ROOT: /Users/stephen/Repositories/burgess-hill/cms
REMOTE_ADDR: ::1
SERVER_PORT: 80
SERVER_ADDR: ::1
SERVER_NAME: burgess-hill.local
SERVER_SOFTWARE: Apache
PATH: /usr/bin:/bin:/usr/sbin:/sbin
HTTP_COOKIE: cmsa=1; PHPSESSID=2d6ede3f926e0bd8af1e745867b9dbee
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.9
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_REFERER: https://burgess-hill.local/perch/core/settings/diagnostics/
HTTP_DNT: 1
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/63.0.3239.132 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_CONNECTION: keep-alive
HTTP_HOST: burgess-hill.local
REDIRECT_STATUS: 200
REDIRECT_HANDLER: php-fastcgi
FCGI_ROLE: RESPONDER
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1518606613.05
REQUEST_TIME: 1518606613
argc: 1

Hi, Have you been able to recreate this?

Hi, any updates on this?

I've a site going live next week. Is it a bug, or is it a problem just with my install?

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, no updates. I'll take a look at it when I'm next working on this.

Hi,

I'm working on another site and I'm still experiencing this problem. Any updates?

Quick recap.

  1. Save a blog post with a status of published, it appears on the website
  2. Return to the post, click meta and social tab, press save
  3. Return to website, post missing
  4. Return to post in cms, press save.
  5. Post is visible on website.

Here's another video showing me clicking between the post tabs and pressing save.

Have you been able to recreate the problem locally?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, the update is that I’ve designed and engineered a completely new way of dealing with extended properties in the form of field groups. That will eliminate this problem. I’m not attempting to fix your steps as I’m replacing them.

That's great news. I've been using perch:groups, it makes a huge difference to managing content in the CMS. Looking forward to seeing the new extended properties solution.