Forum

Thread tagged as: Question, Runway

Runway Routes

Hi,

I have multiple collections. Setting up the Routes for the Collections I define them to be located at [slug:s]

I noticed that only one of the Collections works at https://example:/slug-name using the Route - the other Collections are wanting to use the Master Page on the working Collection even though they have separate Master Pages defined in the settings for the page.

Any ideas why this might be the case? Is this a problem with the way I define the Route?

Routes

Attached is a screen shot of my Routes for Collections, green is a working route, red is a not working route, yellow is routes that should go to the same page:

Routes

Diagnostics Report

Perch Runway: 2.8.26
Production mode: Production (100)
Installed apps: content (2.8.26), assets (2.8.26), categories (2.8.26), collection_5 (2.8.26), collection_2 (2.8.26), collection_1 (2.8.26), collection_6 (2.8.26), collection_4 (2.8.26), collection_3 (2.8.26)
DB driver: PDO
DB tables: perch2_backup_plans (0), perch2_backup_resources (0), perch2_backup_runs (0), perch2_categories (8), perch2_category_counts (0), perch2_category_sets (2), perch2_collection_index (8052), perch2_collection_items (197), perch2_collection_revisions (37), perch2_collections (6), perch2_content_index (0), perch2_content_items (0), perch2_content_regions (1), perch2_members (0), perch2_members_forms (0), perch2_members_member_tags (0), perch2_members_sessions (0), perch2_members_tags (0), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_routes (15), perch2_page_templates (24), perch2_pages (18), perch2_resource_log (1920), perch2_resource_tags (8), perch2_resources (379), perch2_resources_to_tags (28), perch2_settings (25), perch2_shop_addresses (0), perch2_shop_admin_index (0), perch2_shop_brands (0), perch2_shop_cart (0), perch2_shop_cart_data (0), perch2_shop_cart_items (0), perch2_shop_countries (248), perch2_shop_currencies (152), perch2_shop_customers (0), perch2_shop_emails (1), perch2_shop_index (0), perch2_shop_option_values (0), perch2_shop_options (0), perch2_shop_order_items (0), perch2_shop_orders (0), perch2_shop_product_files (0), perch2_shop_product_option_values (0), perch2_shop_product_options (0), perch2_shop_product_tags (0), perch2_shop_products (0), perch2_shop_promotions (0), perch2_shop_search (0), perch2_shop_shippings (0), perch2_shop_tax_exhibits (0), perch2_shop_tax_group_rates (0), perch2_shop_tax_groups (0), perch2_shop_tax_locations (0), perch2_shop_tax_rates (0), perch2_shop_variants (0), perch2_user_passwords (0), perch2_user_privileges (30), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (1)
Users: 1
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
    );
Editor plug-ins: markitup
H1: 509805ffec8547456676464bb77923b6
L1: 4043fa6928ca675d97aec002d2d870e5
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #035b9b
content_singlePageEdit: 1
helpURL:
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.13: done
update_runway_2.8.15: done
headerScheme: dark
update_runway_2.8.13: done
latest_version: 2.8.15
on_sale_version: 2.8.26
dashboard: 1
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
siteURL: /
update_runway_2.8.17: done
update_runway_2.8.18: done
update_runway_2.8.23: done
perch_shop_update: g10
perch_members_update: 1.4
update_runway_2.8.24: done
update_runway_2.8.25: done
update_runway_2.8.26: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /Users/danlee/Sites/Work/armstrong
PERCH_SCHEDULE_SECRET: 3zusF5zHjpqi6Yyi
PERCH_DB_USERNAME: db129224
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: armstrong
PERCH_DB_PREFIX: perch2_
PERCH_EMAIL_FROM: dan.lee@uk-cpi.com
PERCH_EMAIL_FROM_NAME: Dan Lee
PERCH_LOGINPATH: /login
PERCH_PATH: /Users/danlee/Sites/Work/armstrong/login
PERCH_CORE: /Users/danlee/Sites/Work/armstrong/login/core
PERCH_RESFILEPATH: /Users/danlee/Sites/Work/armstrong/login/resources
PERCH_RESPATH: /login/resources
PERCH_HTML5: 1
PERCH_TZ: Europe/London
PERCH_EMAIL_METHOD: smtp
PERCH_EMAIL_HOST: smtp.gmail.com
PERCH_EMAIL_AUTH: 1
PERCH_EMAIL_SECURE: ssl
PERCH_EMAIL_PORT: 465
PERCH_EMAIL_USERNAME: ukcpiweb@gmail.com
PERCH_YOUTUBE_API_KEY: AIzaSyABObR78cRpeVORGJkYkKEAclJodKiURcE
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/danlee/Sites/Work/armstrong/login/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.5.20
Zend: 2.5.0
OS: Darwin
SAPI: apache2handler
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: bf9ad53b11c9a57efdb1057292d73b928b8c5c77 $
MySQL server: 5.6.24
Free disk space: 766.02 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, json, ldap, mbstring, session, standard, mysqlnd, mysqli, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysql, shmop, SimpleXML, snmp, soap, sockets, exif, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, apache2handler
GD: Yes
ImageMagick: No
PHP max upload size: 120M
PHP max form post size: 122M
PHP memory limit: 228M
Total max uploadable file size: 120M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
HTTP_HOST: armstrong.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_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36
HTTP_REFERER: https://armstrong.dev/login/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: cookieconsent_dismissed=yes; MCEvilPopupClosed=yes; _ga=GA1.2.2035432822.1445252319; cmsa=1; PHPSESSID=5lbdfshs11l2j258srqgventf5
PATH: /usr/bin:/bin:/usr/sbin:/sbin
SERVER_SOFTWARE: Apache/2.4.10 (Unix) PHP/5.5.20
SERVER_NAME: armstrong.dev
SERVER_ADDR: 127.0.0.1
SERVER_PORT: 80
REMOTE_ADDR: 127.0.0.1
DOCUMENT_ROOT: /Users/danlee/Sites/Work/armstrong
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: /Users/danlee/Sites/Work/armstrong
SERVER_ADMIN: you@example.com
SCRIPT_FILENAME: /Users/danlee/Sites/Work/armstrong/login/core/settings/diagnostics/index.php
REMOTE_PORT: 57906
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /login/core/settings/diagnostics/?extended
SCRIPT_NAME: /login/core/settings/diagnostics/index.php
PHP_SELF: /login/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1456143670.86
REQUEST_TIME: 1456143670 

Debug Output for Pages that don't work

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: [slug:s]
Using master page: /templates/pages/tech/tech.php
Page arguments:
Array
(
    [0] => /smes
    [s] => smes
    [1] => smes
)
[1] SELECT collectionID, collectionTemplate FROM perch2_collections WHERE collectionKey='Technology'
[nil] SELECT * FROM ( SELECT idx.itemID, ci.collectionID, ci.itemJSON, idx2.indexValue as sortval FROM perch2_collection_index idx JOIN perch2_collection_items ci ON idx.itemID=ci.itemID AND idx.itemRev=ci.itemRev AND idx.collectionID=ci.collectionID JOIN perch2_collection_revisions cr ON idx.itemID=cr.itemID AND idx.itemRev=cr.itemRev AND idx.collectionID=ci.collectionID JOIN perch2_collection_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE (idx.collectionID=3) AND ((idx.indexKey='slug' AND idx.indexValue='smes')) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, itemJSON, sortval ORDER BY sortval ASC
Using template: /templates/content//tech/tech.html
Using sub-template: /templates/content/global.html
Using sub-template: /templates/content/tech/_sidebar_menu.html
Using sub-template: /templates/content/tech/_mobile_menu.html
Using sub-template: /templates/content/tech/_mobile_page_end.html
Using sub-template: /templates/content/tech/_menu_items.html
Using sub-template: /templates/content/tech/_menu_items.html
Using sub-template: /templates/content/tech/_menu_items.html
[1] SELECT * FROM perch2_pages WHERE pagePath='/technologies' LIMIT 1
Using template: /templates/pages/attributes/default.html
Using sub-template: /templates/pages/attributes/seo.html
Using sub-template: /templates/pages/attributes/facebook.html
Using sub-template: /templates/pages/attributes/twitter.html
[1] SELECT * FROM ( SELECT idx.itemID, ci.collectionID, ci.itemJSON, idx2.indexValue as sortval FROM perch2_collection_index idx JOIN perch2_collection_items ci ON idx.itemID=ci.itemID AND idx.itemRev=ci.itemRev AND idx.collectionID=ci.collectionID JOIN perch2_collection_revisions cr ON idx.itemID=cr.itemID AND idx.itemRev=cr.itemRev AND idx.collectionID=ci.collectionID JOIN perch2_collection_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='title' WHERE (idx.collectionID=3) AND ((idx.indexKey='hide' AND idx.indexValue != 'true')) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, itemJSON, sortval ORDER BY sortval ASC
[1] Using template: /templates/content/tech/_tech_menu.html
Request time: 0.0284
Process time: 0.0274
Memory: 3.4756
Array
(
    [type] => 8
    [message] => Undefined offset: 0
    [file] => /Users/danlee/Sites/Work/armstrong/login/templates/pages/tech/tech.php
    [line] => 29
)

Thanks in advance,

Dan

Dan Lee

Dan Lee 1 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please post your Diagnostics Report plus more details of the routes you have set up so we can help.

Dan Lee

Dan Lee 1 points

Sorry Rachel!

I have updated the original message with more information including Screen Shot of my Routes, Diagnostic Report and Debug Output for a Page that isn't working.

Thanks,

Dan

Drew McLellan

Drew McLellan 2638 points
Perch Support

A route of just [slug:s] is going to match almost anything. It's so generic, you'd certainly not need 3 of them.

What are you trying to achieve?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. You only need one route to match those, and they'll all go to the same page. I'm not sure how you'll pick them apart from that point.