Forum

Thread tagged as: Question, Addons, Events

Event categories

<perch:before>
<div class="controls">
    <button type="button" class="control btn--alle" data-filter="all">Alle</button>
</perch:before>
    <button type="button" class="control btn--<perch:events id="categorySlug" />" data-filter=".<perch:events id="categorySlug" />"><perch:events id="categoryTitle" /></button>
<perch:after>
</div>
</perch:after>

Using the above template I thought that only the categories being used would be shown, unfortunately all the categories are. Is there a way to show just the categories in use?

Matthew Owen

Matthew Owen 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

How are you displaying the template?

<?php perch_events_categories(); ?>
Drew McLellan

Drew McLellan 2638 points
Perch Support

I think you want to use the include-empty option.

'include-empty' => false,
<?php perch_events_categories(array(
                    'include-empty' => false
                    ));
                ?>

that unfortunately changes nothing.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Perhaps you could explain in more detail, in that case.

ah, looking at the category listing of the events app in the backend I see that it is telling me that in all 12 events are listed. And each category has an event. I did give each category an event when testing, but deleted them later. Currently I have 6 events all in one category.

So it appears that I need to flush the category listing - can I?

also, it lists each category as having a future event, which is not the case otherwise I could delete the events right?

ok just ran a test, appears that once a category is given an event it stays as event and future event even if deleted. added two events to the same category to check and after deletion of both still listed as 1 in events and future events.

Perch informationen

    Perch: 3.0.4
    Production mode: (PERCH_DEVELOPMENT)
    Installed apps: content (3.0.4), assets (3.0.4), categories (3.0.4), perch_events (1.9.5), perch_forms (1.9), perch_shop_orders (1.2), perch_shop_products (1.2), perch_shop (1.2), perch_members (1.6.1)
    DB driver: PDO
    DB tables: perch3_categories (0), perch3_category_counts (0), perch3_category_sets (1), perch3_content_index (0), perch3_content_items (0), perch3_content_regions (0), perch3_events (6), perch3_events_categories (7), perch3_events_to_categories (6), perch3_forms (0), perch3_forms_responses (0), perch3_members (0), perch3_members_forms (0), perch3_members_member_tags (0), perch3_members_sessions (0), perch3_members_tags (0), perch3_menu_items (14), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_templates (0), perch3_pages (0), perch3_resource_log (47), perch3_resource_tags (0), perch3_resources (38), perch3_resources_to_tags (0), perch3_settings (30), perch3_shop_addresses (0), perch3_shop_admin_index (30), perch3_shop_brands (1), perch3_shop_cart (31), perch3_shop_cart_data (0), perch3_shop_cart_items (0), perch3_shop_countries (250), perch3_shop_currencies (152), perch3_shop_customers (0), perch3_shop_emails (1), perch3_shop_index (63), perch3_shop_option_values (0), perch3_shop_options (0), perch3_shop_order_items (0), perch3_shop_order_promotions (0), perch3_shop_order_statuses (9), perch3_shop_orders (0), perch3_shop_orders_meta (1), perch3_shop_product_files (0), perch3_shop_product_option_values (0), perch3_shop_product_options (0), perch3_shop_product_tags (0), perch3_shop_products (1), perch3_shop_promotions (0), perch3_shop_sales (0), perch3_shop_search (1), perch3_shop_shipping_zone_countries (0), perch3_shop_shipping_zones (1), perch3_shop_shippings (1), perch3_shop_tax_exhibits (0), perch3_shop_tax_group_rates (1), perch3_shop_tax_groups (1), perch3_shop_tax_locations (1), perch3_shop_tax_rates (1), perch3_shop_variants (0), perch3_user_passwords (0), perch3_user_privileges (73), perch3_user_role_privileges (2), perch3_user_roles (2), perch3_users (1)
    Users: 1
    App runtimes:

    <?php
        $apps_list = [ 
            'perch_events',
            'perch_members',
            'perch_shop',
            'perch_forms',
        ];

    Editor plug-ins: ckeditor
    H1: 9b6663a1dce7c227474c395bf283281b
    L1: f3e179a16300920e3b23db2f0f83d350
    F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
    headerColour: #0064b1
    content_singlePageEdit: 1
    helpURL:
    siteURL: /
    hideBranding: 1
    content_collapseList: 1
    lang: de-de
    installedAt: 3.0
    update_3.0: done
    latest_version:
    on_sale_version:
    headerScheme: light
    dashboard: 0
    hide_pwd_reset: 0
    content_hideNonEditableRegions: 0
    content_frontend_edit: 0
    logoPath: /perch/resources/logo-cms.jpg
    perch_events_update: 1.8
    perch_events_detail_url: /programm/event.php?s={eventSlug}
    perch_shop_update: 1.2
    perch_members_login_page: /members/login.php?r={returnURL}
    perch_shop_price_tax_mode: inc
    perch_shop_site_url: https://
    perch_shop_product_url: /shop/products/{slug}
    perch_shop_invoice_number_format: Invoice%d
    perch_shop_default_currency: 44
    perch_shop_reporting_currency: 44
    perch_members_update: 1.4
    update_3.0.4: done
    content_skip_region_list: 0
    PERCH_DEVELOPMENT: 10
    PERCH_STAGING: 50
    PERCH_PRODUCTION: 100
    PERCH_DB_USERNAME: rs9694web2sql5
    PERCH_DB_SERVER: r2web6.masterlogin.de
    PERCH_DB_DATABASE: rs9694web2sql5db1
    PERCH_DB_PREFIX: perch3_
    PERCH_TZ: Europe/Berlin
    PERCH_EMAIL_FROM: iphone@sdb-grafik.de
    PERCH_EMAIL_FROM_NAME: Matthew Owen
    PERCH_LOGINPATH: /perch
    PERCH_PATH: /opt/users/www/rs9694web2/html/lfgi/perch
    PERCH_CORE: /opt/users/www/rs9694web2/html/lfgi/perch/core
    PERCH_RESFILEPATH: /opt/users/www/rs9694web2/html/lfgi/perch/resources
    PERCH_RESPATH: /perch/resources
    PERCH_FEATHERS: 1
    PERCH_HTML5: 1
    PERCH_RWD: 1
    PERCH_GMAPS_API_KEY: AIzaSyB-7hYhO336ZEZlMoOZemle06EBJUzP72I
    PERCH_PRODUCTION_MODE: PERCH_DEVELOPMENT
    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_ASSET_VERSION: ed79f7a54b300ef2b1e6
    PERCH_DEBUG:
    PERCH_PREVIEW_ARG: preview
    PERCH_TEMPLATE_PATH: /opt/users/www/rs9694web2/html/lfgi/perch/templates
    PERCH_TEMPLATE_FILTERS:
    PERCH_DEFAULT_DOC: index.php
    PERCH_DEFAULT_EXT: .php
    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_AUTH_PLUGIN:
    PERCH_DB_CHARSET: utf8
    PERCH_DB_PORT:
    PERCH_DB_SOCKET:
    PERCH_SHOP_VERSION: 1.2
    PERCH_APPS_EDITOR_PLUGIN: markitup
    PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown

Hosting-Einstellungen

    PHP: 7.0.14
    Zend: 3.0.0
    OS: Linux
    SAPI: cgi-fcgi
    Safe mode: not detected
    MySQL client: mysqlnd 5.0.12-dev - 20150407 - $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $
    MySQL server: 5.5.5-10.1.17-MariaDB
    Free disk space: 28.49 GB
    Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, gmp, SPL, iconv, session, intl, json, mbstring, mcrypt, standard, mysqli, odbc, mysqlnd, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, imap, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, cgi-fcgi, mysql, Zend OPcache
    GD: Yes
    ImageMagick: No
    PHP max upload size: 32M
    PHP max form post size: 32M
    PHP memory limit: 64M
    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_MAX_REQUESTS: 10000
    PATH: /sbin:/bin
    PHPRC: /opt/users/www/php/lfgi.kulturschmiede.de/
    PWD: /opt/users/www/php/lfgi.kulturschmiede.de
    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
    REMOTE_PORT: 54283
    SCRIPT_FILENAME: /opt/users/www/rs9694web2/html/lfgi/perch/core/settings/diagnostics/index.php
    SERVER_ADMIN: Iphone@sdb-grafik.de
    CONTEXT_DOCUMENT_ROOT: /opt/users/www/rs9694web2/html/lfgi
    REQUEST_SCHEME: http
    DOCUMENT_ROOT: /opt/users/www/rs9694web2/html/lfgi
    REMOTE_ADDR: 91.19.246.212
    SERVER_PORT: 80
    SERVER_ADDR: 95.129.51.181
    SERVER_NAME: lfgi.kulturschmiede.de
    SERVER_SOFTWARE: Apache/2.4.20 (Unix) OpenSSL/1.0.1t mod_fcgid/2.3.9
    LD_LIBRARY_PATH: /opt/apache-2.4/lib
    HTTP_UPGRADE_INSECURE_REQUESTS: 1
    HTTP_CONNECTION: close
    HTTP_COOKIE: PHPSESSID=97580f11bd829a323ae14771c2233a2a; cmsa=1; ckCsrfToken=Yfe61eYw1v8op14YciVdrkXi2962gH1RIZQ3v87o
    HTTP_REFERER: https://lfgi.kulturschmiede.de/perch/core/settings/diagnostics/add-ons/
    HTTP_ACCEPT_ENCODING: gzip, deflate
    HTTP_ACCEPT_LANGUAGE: de,en-US;q=0.7,en;q=0.3
    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.12; rv:53.0) Gecko/20100101 Firefox/53.0
    HTTP_HOST: lfgi.kulturschmiede.de
    WHITELIST_BOTS: false
    WHITELIST_UA: false
    FCGI_ROLE: RESPONDER
    PHP_SELF: /perch/core/settings/diagnostics/index.php
    REQUEST_TIME_FLOAT: 1496841859.6925
    REQUEST_TIME: 1496841859
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, that sounds plausible. Do you need a calendar display for this? Is that why you're using Events?

no I don't need a calendar display. I need a list of events which I am filtering and sorting with mixitup

For the filter/sort controls I am using the categories.

So if after event deletion and/or becoming a past event the category listing is still showing all categories, then I have a problem.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you don't need the calendar display, I'd probably suggest not using the Events app. It's old and has a lot of shortcomings.

But there are so many pro's as to why I should. thats a real shame. Is there a update timeline for events app?

Why would the categories be shown as having an event when no event is present?

Drew McLellan

Drew McLellan 2638 points
Perch Support

At the moment I think the most likely scenario is that the Events app will be deprecated. Its presence may be standing as a barrier for third parties to releasing their own, and I need to focus my time of functionality that affects the most customers.

Ok that's understandable. Could I use the Perch categories as a substitute in this scenario?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, everything should be achievable with started functionality, apart from the calendar view.

cool! I thanks you. Thread may be closed ;-)