Forum

Thread tagged as: Addons, Runway, Shop

Shop 1.0.10 Upgrade Problem

I have tried upgrading Perch Shop from 1.0.09 - 1.0.10 on development machine and all the products have vanished from the pages of my site. They remain in Perch admin.

The error seems to be down to Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'productStatus' in 'where clause' found in the debug on the pages that display products.

Here is a page debug in full and diagnostic report:

Time    Δ   Debug Message
0.0435  0   [41] 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
0.045   0.0016  Matched route: shop/category/[slug:cat]
0.0451  0.0001  Using master page: /templates/pages/shop/categories.php
0.0452  0   Page arguments:
Array
(
    [0] => /shop/category/washers
    [cat] => washers
    [1] => washers
)
0.0495  0.0043  [1] SELECT * FROM perch2_pages WHERE pagePath='/shop/category' LIMIT 1
0.0547  0.0052  [1] SELECT * FROM perch2_shop_cart WHERE cartID=916
0.0553  0.0006  [1] SELECT * FROM perch2_shop_cart WHERE cartID=916
0.0563  0.0011  Using template: /templates/pages/attributes/default.html
0.0565  0.0002  Using sub-template: /templates/pages/attributes/seo.html
0.0566  0.0001  Using sub-template: /templates/pages/attributes/facebook.html
0.0567  0.0001  Using sub-template: /templates/pages/attributes/twitter.html
0.0596  0.003   [6] SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 AND pageDepth >=0 AND pageDepth<=1 ORDER BY pageTreePosition ASC
0.0604  0.0008  [1] SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/shop/category' LIMIT 1
0.0608  0.0003  [2] SELECT pageID FROM perch2_pages WHERE pageTreePosition IN ('000-003-009', '000-003', '000') ORDER BY pageTreePosition DESC
0.0612  0.0004  [6] Using template: /templates/navigation/item.html
0.063   0.0018  [1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Product Categories' AND (regionPage='/shop' OR regionPage='*')
0.0636  0.0006  [38] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=35 AND idx.itemRev=65)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
0.0802  0.0166  [38] Using template: /templates/content/_prod_cat_nav.html
0.0814  0.0012  [1] SELECT * FROM perch2_categories ORDER BY catTreePosition ASC
0.0961  0.0147  Using template: /templates/search/search-form.html
0.1004  0.0043  [0] SELECT setID FROM perch2_category_sets WHERE setSlug='' LIMIT 1
0.1011  0.0007  [1] SELECT main.* FROM perch2_categories main WHERE 1=1 AND (catPath='products/washers/') ORDER BY catTreePosition ASC
0.1016  0.0005  [1] Using template: /templates/categories/cat_title.html
0.1043  0.0026  [5] SELECT DISTINCT idx.itemID FROM perch2_shop_index idx JOIN perch2_shop_products main ON idx.itemID=main.productID AND idx.itemKey='productID' AND ((idx.indexKey='_category' AND idx.indexValue LIKE 'products/washers%' OR idx.indexKey='_category' AND idx.indexValue='products/washers'))
0.106   0.0017  SELECT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch2_shop_index idx JOIN perch2_shop_products main ON idx.itemID=main.productID AND idx.itemKey='productID' JOIN perch2_shop_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='productID' AND idx2.indexKey='title' AND idx.itemID IN ('8', '19', '11', '2', '34') WHERE 1=1 AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey ) as tbl WHERE (productDeleted IS NULL AND productStatus=1 AND parentID IS NULL) GROUP BY itemID, sortval ORDER BY sortval ASC
0.1065  0.0005  Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'productStatus' in 'where clause'
0.1077  0.0013  [35] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
0.1103  0.0025  Using template: /templates/shop/products/list.html
0.1107  0.0004  [4] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/shop/category' OR regionPage='*' ORDER BY regionPage DESC
0.1114  0.0007  Request time: 0.1114
0.1115  0.0001  Process time: 0.1103
0.1116  0.0001  Memory: 4.0081

Perch Runway: 2.8.32, PHP: 7.0.12, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.32), assets (2.8.32), categories (2.8.32), perch_blog (5.0), perch_forms (1.8.3), perch_shop_orders (1.0.10), perch_shop_products (1.0.10), perch_shop (1.0.10), perch_members (1.5)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_blog', 'perch_members', 'perch_shop', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/greg/Sites/millers/trunk/perch
PERCH_CORE: /Users/greg/Sites/millers/trunk/perch/core
PERCH_RESFILEPATH: /Users/greg/Sites/millers/trunk/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: millers
DOCUMENT_ROOT: /Users/greg/Sites/millers/trunk
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Greg Riley

Greg Riley 1 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

When you went to the Shop app, did the upgrade run?

I only looked in the products section. I have just been to the shop section (app) and the upgrade message has shown and the problem is fixed. Many thanks again.