Forum

Thread tagged as: Problem, Shop

Updated

Debug Message - Perch 3.0.3
[1] SELECT * FROM perch3_pages WHERE pagePath='/search-results.php' LIMIT 1
[1] SELECT * FROM perch3_shop_cart WHERE cartID=37
[1] SELECT * FROM perch3_shop_cart WHERE cartID=37
Using template: /templates/search/search-form.html
[0] SELECT setID FROM perch3_category_sets WHERE setSlug='' LIMIT 1
[12] SELECT main.* FROM perch3_categories main WHERE 1=1 AND (catPath REGEXP '[[:<:]]products\/?[[:>:]]' AND LENGTH(catTreePosition) - LENGTH(REPLACE(catTreePosition, "-", ""))=1) ORDER BY catTreePosition ASC
[12] Using template: /templates/categories/side-nav.html
Using cart from cache.
[27] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0
Using template: /addons/apps/perch_shop/templates/shop/cart/mini-cart.html
Using template: /addons/apps/perch_members/templates/members/login/mini-login.html
[65] SELECT DISTINCT idx.itemID FROM perch3_shop_index idx JOIN perch3_shop_brands main ON idx.itemID=main.brandID AND idx.itemKey='brandID' AND ((idx.indexKey='status' AND idx.indexValue='1')) GROUP BY idx.itemID HAVING COUNT(idx.itemID)=1
[10] SELECT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_shop_index idx JOIN perch3_shop_brands main ON idx.itemID=main.brandID AND idx.itemKey='brandID' JOIN perch3_shop_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='brandID' AND idx2.indexKey='title' AND idx.itemID IN ('1', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '2', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '3', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '4', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '5', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '6', '60', '61', '62', '63', '64', '65', '7', '8', '9') WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, brandID ) as tbl WHERE (brandDeleted IS NULL) GROUP BY itemID, sortval ORDER BY RAND() LIMIT 0, 10
[10] Using template: /addons/apps/perch_shop/templates/shop/brands/list2.html
[0] SELECT setID FROM perch3_category_sets WHERE setSlug='' LIMIT 1
[12] SELECT main.* FROM perch3_categories main WHERE 1=1 AND (catPath REGEXP '[[:<:]]products\/?[[:>:]]' AND LENGTH(catTreePosition) - LENGTH(REPLACE(catTreePosition, "-", ""))=1) ORDER BY catTreePosition ASC
[12] Using template: /templates/categories/side-nav.html
Search term: mob
[nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT 'PerchContent_SearchHandler' AS source, MATCH(ci.itemSearch) AGAINST('mob') AS score, r.regionPage AS col1, ci.itemSearch AS col2, ci.itemJSON AS col3, r.regionOptions AS col4, p.pageNavText AS col5, p.pageTitle AS col6, regionTemplate AS col7, r.regionKey AS col8 FROM perch3_content_regions r, perch3_content_items ci, perch3_pages p WHERE r.regionID=ci.regionID AND r.regionRev=ci.itemRev AND r.pageID=p.pageID AND r.regionPage!='*' AND r.regionSearchable=1 AND (MATCH(ci.itemSearch) AGAINST('mob') OR MATCH(ci.itemSearch) AGAINST('mob') ) AND r.regionPage LIKE '/%' UNION SELECT 'PerchShop_SearchHandler' AS source, MATCH(s.searchBody) AGAINST('mob') AS score, p.title, p.productSlug, p.productDynamicFields, p.productTemplate, productID, "", "", "" FROM perch3_shop_search s, perch3_shop_products p WHERE p.productDeleted IS NULL AND p.productID=s.itemKey AND s.itemType='product' AND MATCH(s.searchBody) AGAINST('mob') AND p.productID IN ( SELECT itemID FROM perch3_shop_index WHERE itemKey='productID' AND itemID=p.productID AND indexKey='status' AND indexValue=1 ) ORDER BY score DESC LIMIT 0, 10
[nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT 'PerchContent_SearchHandler' AS source, 0-(LENGTH(r.regionPage)-LENGTH(REPLACE(r.regionPage, '/', ''))) AS score, r.regionPage AS col1, ci.itemSearch AS col2, ci.itemJSON AS col3, r.regionOptions AS col4, p.pageNavText AS col5, p.pageTitle AS col6, regionTemplate AS col7, r.regionKey AS col8 FROM perch3_content_regions r, perch3_content_items ci, perch3_pages p WHERE r.regionID=ci.regionID AND r.regionRev=ci.itemRev AND r.pageID=p.pageID AND r.regionPage!='*' AND r.regionSearchable=1 AND ci.itemSearch REGEXP '[[:<:]]mob[[:>:]]' AND r.regionPage LIKE '/%' UNION SELECT 'PerchShop_SearchHandler' AS source, p.stock_level AS score, p.title, p.productSlug, p.productDynamicFields, p.productTemplate, p.productID, "", "", "" FROM perch3_shop_search s, perch3_shop_products p WHERE p.productDeleted IS NULL AND p.productID=s.itemKey AND s.itemType='product' AND ( concat(" ", s.searchBody, " ") REGEXP '[[:<:]]mob[[:>:]]' ) AND p.productID IN ( SELECT itemID FROM perch3_shop_index WHERE itemKey='productID' AND itemID=p.productID AND indexKey='status' AND indexValue=1 ) ORDER BY score ASC LIMIT 0, 10
[0] SELECT FOUND_ROWS() AS `count`
Using template: /templates/search/search-result.html
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you post your full diagnostics report?


Perch: 3.0.3 Production mode: Production (100) Installed apps: content (3.0.3), assets (3.0.3), categories (3.0.3), perch_forms (1.9), perch_shop_orders (1.1), perch_shop_products (1.1), perch_shop (1.1), perch_members (1.6) DB driver: PDO DB tables: perch2_categories (0), perch2_category_counts (0), perch2_category_sets (0), perch2_content_index (0), perch2_menu_items (8), perch2_navigation (0), perch2_navigation_pages (0), perch2_resource_log (0), perch2_resource_tags (0), perch2_resources (0), perch2_resources_to_tags (0), perch2_user_passwords (0), perch2_user_role_privileges (0), perch3_categories (86), perch3_category_counts (0), perch3_category_sets (1), perch3_content_index (0), perch3_content_items (0), perch3_content_regions (0), perch3_forms (0), perch3_forms_responses (0), perch3_members (1), perch3_members_forms (1), perch3_members_member_tags (1), perch3_members_sessions (2), perch3_members_tags (7), perch3_menu_items (13), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_templates (0), perch3_pages (0), perch3_resource_log (640), perch3_resource_tags (0), perch3_resources (462), perch3_resources_to_tags (0), perch3_settings (27), perch3_shop_addresses (8), perch3_shop_admin_index (30), perch3_shop_brands (65), perch3_shop_cart (37), perch3_shop_cart_data (55), perch3_shop_cart_items (6), perch3_shop_countries (250), perch3_shop_currencies (152), perch3_shop_customers (3), perch3_shop_emails (1), perch3_shop_index (18952), perch3_shop_option_values (46), perch3_shop_options (4), perch3_shop_order_items (1), perch3_shop_order_promotions (0), perch3_shop_order_statuses (9), perch3_shop_orders (1), perch3_shop_orders_meta (1), perch3_shop_product_files (0), perch3_shop_product_option_values (189), perch3_shop_product_options (42), perch3_shop_product_tags (0), perch3_shop_products (291), perch3_shop_promotions (0), perch3_shop_search (56), perch3_shop_shipping_zone_countries (1), perch3_shop_shipping_zones (1), perch3_shop_shippings (1), perch3_shop_tax_exhibits (1), perch3_shop_tax_group_rates (1), perch3_shop_tax_groups (1), perch3_shop_tax_locations (1), perch3_shop_tax_rates (1), perch3_shop_variants (328), perch3_user_passwords (0), perch3_user_privileges (69), perch3_user_role_privileges (2), perch3_user_roles (2), perch3_users (1) Users: 1 App runtimes: <?php $apps_list = [ 'perch_members', 'perch_shop', 'perch_forms', ]; Editor plug-ins: markitup H1: f76d7cd109953878a57d9737a916efa1 L1: 92ace06c853b7486a62a2e2d600d6ee5 F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7 headerColour: #ffffff content_singlePageEdit: 1 helpURL: siteURL: / hideBranding: 1 content_collapseList: 1 lang: en-gb installedAt: 3.0 update_3.0: done latest_version: on_sale_version: headerScheme: light dashboard: 1 perch_shop_price_tax_mode: exc perch_shop_site_url: https:// perch_shop_product_url: product.php?s={slug} perch_shop_invoice_number_format: Invoice%d perch_members_login_page: login.php?r={returnURL} hide_pwd_reset: 0 content_hideNonEditableRegions: 0 content_frontend_edit: 0 perch_shop_update: 1.1 logoPath: /admin/resources/logo-footer.png perch_shop_default_currency: 47 perch_shop_reporting_currency: 47 perch_members_update: 1.4 update_3.0.3: done PERCH_DEVELOPMENT: 10 PERCH_STAGING: 50 PERCH_PRODUCTION: 100 PERCH_DB_USERNAME: safetyevans PERCH_DB_SERVER: 213.171.200.83 PERCH_DB_DATABASE: evanssafetyv1 PERCH_DB_PREFIX: perch3_ PERCH_EMAIL_FROM: jade@picseli.co.uk PERCH_EMAIL_FROM_NAME: Jade Marling PERCH_EMAIL_METHOD: smtp PERCH_LOGINPATH: /admin PERCH_PATH: /home/linweb42/d/dryhome.web-design.wales/user/htdocs/admin PERCH_CORE: /home/linweb42/d/dryhome.web-design.wales/user/htdocs/admin/core PERCH_RESFILEPATH: /home/linweb42/d/dryhome.web-design.wales/user/htdocs/admin/resources PERCH_RESPATH: /admin/resources PERCH_HTML5: 1 PERCH_DEBUG: 1 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_PREVIEW_ARG: preview PERCH_TEMPLATE_PATH: /home/linweb42/d/dryhome.web-design.wales/user/htdocs/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_AUTH_PLUGIN: PERCH_DB_CHARSET: utf8 PERCH_DB_PORT: PERCH_DB_SOCKET: PERCH_SHOP_VERSION: 1.1 PERCH_APPS_EDITOR_PLUGIN: markitup PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown Hosting settings PHP: 5.6.24 Zend: 2.6.0 OS: Linux SAPI: cgi-fcgi Safe mode: not detected MySQL client: 5.5.52-MariaDB MySQL server: 5.6.36-log Free disk space: 127.48 GB Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, fileinfo, filter, ftp, gettext, gmp, SPL, iconv, intl, pcntl, session, standard, posix, readline, Reflection, Phar, shmop, SimpleXML, sockets, mbstring, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, cgi-fcgi, bcmath, dba, dom, gd, imap, json, ldap, exif, mcrypt, mssql, mysql, mysqli, odbc, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, pspell, snmp, soap, tidy, xmlreader, xmlrpc, xmlwriter, xsl, zip, mhash, ionCube Loader, Zend OPcache, Zend Guard Loader GD: Yes ImageMagick: No PHP max upload size: 20M PHP max form post size: 20M PHP memory limit: 64M Total max uploadable file size: 20M Resource folder writeable: Yes Session timeout: 24 minutes Native JSON: Yes Filter functions: Yes Transliteration functions: Yes PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PWD: /var/www/fcgi PHP_FCGI_MAX_REQUESTS: 100 ORIG_SCRIPT_NAME: /fcgi-bin/php56-cgi ORIG_PATH_TRANSLATED: /home/linweb42/d/dryhome.web-design.wales/user/htdocs/admin/core/settings/diagnostics/index.php ORIG_PATH_INFO: /admin/core/settings/diagnostics/index.php ORIG_SCRIPT_FILENAME: /var/www/fcgi/php56-cgi SCRIPT_NAME: /admin/core/settings/diagnostics/index.php REQUEST_URI: /admin/core/settings/diagnostics/?extended QUERY_STRING: extended REQUEST_METHOD: GET SERVER_PROTOCOL: HTTP/1.0 GATEWAY_INTERFACE: CGI/1.1 REDIRECT_URL: /admin/core/settings/diagnostics/index.php REDIRECT_QUERY_STRING: extended REMOTE_PORT: 43392 SCRIPT_FILENAME: /home/linweb42/d/dryhome.web-design.wales/user/htdocs/admin/core/settings/diagnostics/index.php SERVER_ADMIN: support@fasthosts.com CONTEXT_DOCUMENT_ROOT: /var/www/fcgi/ CONTEXT_PREFIX: /fcgi-bin/ REQUEST_SCHEME: http DOCUMENT_ROOT: /home/linweb42/d/dryhome.web-design.wales/user/htdocs REMOTE_ADDR: 91.103.188.194 SERVER_PORT: 80 SERVER_ADDR: 127.0.0.1 SERVER_NAME: dryhome.web-design.wales SERVER_SOFTWARE: Apache HTTP_UPGRADE_INSECURE_REQUESTS: 1 HTTP_COOKIE: PHPSESSID=btil7oqoudcj71oab4ma33tg53; cmsa=1; _ga=GA1.2.1213306607.1493739938 HTTP_REFERER: https://dryhome.web-design.wales/admin/core/settings/diagnostics/ HTTP_ACCEPT_ENCODING: gzip, deflate HTTP_ACCEPT_LANGUAGE: en-GB,en;q=0.5 HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 HTTP_CONNECTION: close HTTP_X_FORWARDED_FOR: 91.103.188.194 HTTP_X_REAL_IP: 91.103.188.194 HTTP_HOST: dryhome.web-design.wales UNIQUE_ID: WRAqQJ4os9Ql91d@btcpdQAAAVU on: 127.0.0.1 REDIRECT_STATUS: 200 REDIRECT_HANDLER: application/x-httpd-php56 REDIRECT_UNIQUE_ID: WRAqQJ4os9Ql91d@btcpdQAAAVU REDIRECT_on: 127.0.0.1 FCGI_ROLE: RESPONDER PHP_SELF: /admin/core/settings/diagnostics/index.php REQUEST_TIME_FLOAT: 1494231616.2323 REQUEST_TIME: 1494231616
Drew McLellan

Drew McLellan 2638 points
Perch Support

It looks like you've got 50+ items in your perch3_shop_search table. Do they look sane to you?

Yes, all of the data looks right

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is it always zero results, no matter the search term?

Yes, that's right.

Any way to fix this?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'm not sure I have any suggestions as to why it's not matching.