Forum

Thread tagged as: Problem, Runway

Reverting collection Item To Draft Does Not Prevent Item Rendering on Front-end

If I choose 'Save as draft' on an existing collection item, it doesn't remove it from my listing on the front-end. Is this expected behaviour, or do I need to pass something else into my perch_collection function?

When I first create a collection item and save as draft, it works as expected, the problem only occurs when reverting to draft.

Perch Runway: 3.0.11
        Production mode: Production (100)
        Installed apps: content (3.0.11), assets (3.0.11), categories (3.0.11), perch_blog (5.6.1), perch_forms (1.9), perch_mailchimp (3.1)
        DB driver: PDO
        DB tables: perch3_backup_plans (1), perch3_backup_resources (0), perch3_backup_runs (22), perch3_blog_authors (4), perch3_blog_comments (0), perch3_blog_index (1764), perch3_blog_posts (63), perch3_blog_posts_to_tags (0), perch3_blog_sections (1), perch3_blog_tags (0), perch3_blog_webmention_queue (0), perch3_blogs (2), perch3_categories (12), perch3_category_counts (7), perch3_category_sets (2), perch3_collection_index (543), perch3_collection_items (42), perch3_collection_revisions (16), perch3_collections (1), perch3_content_index (336), perch3_content_items (26), perch3_content_locks (0), perch3_content_regions (4), perch3_forms (2), perch3_forms_responses (1), perch3_mailchimp_campaigns (40), perch3_mailchimp_imports (6), perch3_mailchimp_lists (10), perch3_mailchimp_subscribers (661), perch3_mailchimp_subscriptions (790), perch3_mailchimp_webhooks (0), perch3_menu_items (13), perch3_navigation (3), perch3_navigation_pages (10), perch3_page_routes (4), perch3_page_templates (16), perch3_pages (6), perch3_resource_log (1910), perch3_resource_tags (13), perch3_resources (1324), perch3_resources_to_tags (26), perch3_settings (34), perch3_user_passwords (0), perch3_user_privileges (46), perch3_user_role_buckets (0), perch3_user_role_privileges (10), perch3_user_roles (2), perch3_users (5)
        Users: 5
        App runtimes: <?php
            $apps_list = array(
                'perch_blog',
                'perch_forms',
                'perch_mailchimp'
            );
        Scheduled tasks for perch_blog: delete_spam_comments (1440 mins), publish_posts (1 mins), process_webmentions (1 mins)
        Scheduled tasks for perch_mailchimp: import_data (1 mins)
        Scheduled tasks for Backup: plan_1 (10 mins)
        Editor plug-ins: config-min.js, config.js
        H1: 900409a7e55dfc236042156ba480611d
        L1: 18bc0520abef088d5f5324c412a0dab0
        F1: 3b606135b33e6a102526838f4152a807
        headerColour: #000000
        content_singlePageEdit: 1
        helpURL:
        siteURL: /
        hideBranding: 1
        content_collapseList: 1
        lang: en-gb
        installedAt: 3.0.2
        update_3.0.2: done
        headerScheme: dark
        update_runway_3.0.2: done
        latest_version:
        on_sale_version: 3.0.11
        perch_blog_update: 5.6
        perch_blog_post_url: /insights/{postSlug}
        perch_blog_site_name:
        perch_blog_slug_format: {postTitle}
        perch_blog_akismet_key:
        perch_blog_max_spam_days: 7
        dashboard: 0
        hide_pwd_reset: 0
        siteOffline: 0
        content_hideNonEditableRegions: 0
        content_frontend_edit: 0
        perch_blog_comment_notify: 0
        update_runway_3.0.4: done
        update_runway_3.0.8: done
        keyboardShortcuts: 0
        content_skip_region_list: 0
        logoPath: /admin/resources/logo.svg
        perch_mailchimp_api_key: eb25f0cac389fef5689e619b77ec027b-us1
        perch_mailchimp_campaign_url: /mailchimp/campaign/{campaignSlug}
        perch_mailchimp_secret: 87668bb
        update_runway_3.0.11: done
        PERCH_DEVELOPMENT: 10
        PERCH_STAGING: 50
        PERCH_PRODUCTION: 100
        PERCH_SITEPATH: /Users/Toby/Sites/frukt
        PERCH_SCHEDULE_SECRET: FH7ILLWtl3v6nY54
        PERCH_DB_USERNAME: root
        PERCH_DB_SERVER: localhost
        PERCH_DB_DATABASE: perch_frukt_local
        PERCH_DB_PREFIX: perch3_
        PERCH_EMAIL_FROM: noreply@wearefrukt.com
        PERCH_EMAIL_FROM_NAME: Frukt
        PERCH_LOGINPATH: /admin
        PERCH_PATH: /Users/toby/Sites/frukt/admin
        PERCH_CORE: /Users/toby/Sites/frukt/admin/core
        PERCH_RESFILEPATH: /Users/toby/Sites/frukt/admin/resources
        PERCH_RESPATH: /admin/resources
        PERCH_HTML5: 1
        PERCH_TZ: UTC
        PERCH_PRODUCTION_MDODE: PERCH_PRODUCTION
        PERCH_UNDO_BUFFER: 10
        PERCH_CUSTOM_EDITOR_CONFIGS: 1
        PERCH_YOUTUBE_API_KEY: AIzaSyAwQF0AibJtUiwBMQ4T9xHtPyN_UpcaRno
        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_DEBUG:
        PERCH_PREVIEW_ARG: preview
        PERCH_TEMPLATE_PATH: /Users/toby/Sites/frukt/admin/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_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.20
        Zend: 3.0.0
        OS: Darwin
        SAPI: apache2handler
        Safe mode: not detected
        MySQL client: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
        MySQL server: 5.6.35
        Free disk space: 189.61 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, 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
        HTTP_HOST: loc.frukt:8888
        HTTP_COOKIE: _ga=GA1.2.1845714403.1504735294; _gid=GA1.2.906378597.1512554999; PHPSESSID=cadc91ef39c3f360f68ccdd907de98ac; cmsa=1
        HTTP_CONNECTION: keep-alive
        HTTP_UPGRADE_INSECURE_REQUESTS: 1
        HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
        HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0.1 Safari/604.3.5
        HTTP_REFERER: http://loc.frukt:8888/admin/core/settings/diagnostics/add-ons/
        HTTP_ACCEPT_LANGUAGE: en-gb
        HTTP_ACCEPT_ENCODING: gzip, deflate
        PATH: /usr/bin:/bin:/usr/sbin:/sbin
        SERVER_SOFTWARE: Apache
        SERVER_NAME: loc.frukt
        SERVER_ADDR: ::1
        SERVER_PORT: 8888
        REMOTE_ADDR: ::1
        DOCUMENT_ROOT: /Users/toby/Sites/frukt
        SERVER_ADMIN: you@example.com
        SCRIPT_FILENAME: /Users/toby/Sites/frukt/admin/core/settings/diagnostics/index.php
        REMOTE_PORT: 54684
        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: 1512558969.65
        REQUEST_TIME: 1512558969
        argc: 1
Toby Martin

Toby Martin 1 points

  • 1 month ago
Jonathan Elliman

Jonathan Elliman 9 points
Registered Developer

I'm pretty sure that's expected behaviour. Save a draft is more a method to save/preview edited entries. You'd need to put in a published/unpublished toggle into the collection item template.

Jon

I was considering that, but didn't want to double-up on a feature if was already in there.

Drew, can you confirm Jon's Synopsis?

Drew McLellan

Drew McLellan 2421 points
Perch Support

When you create a draft you're drafting a new revision of the content. You can test your changes and then make them live.

Creating a new draft revision doesn't revert anything already published. If you want to revert changes, use the Undo feature. In Runway you can view and preview all the previous edits in the stack and revert the content to any of them.