Forum

Thread tagged as: Problem, Configuration, FoxyCart

Can't remove or add product after Shop App update

I've updated Perch to latest version (from an old version < 2.5) and made the same for Shop App (from "Shop App" 1.0 to "Foxycart Shop App" 2.0) but now I can't edit, add or remove any product. I've got the error "Sorry, that product could not be updated." when I want to add or remove a product. Shop App is used only to display products, no payments.

How can I solve this problem ?

Here is diagnostic :

Rapport du Diagnostique
HEALTH CHECK

Perch is up to date
PHP 5.5.9-1ubuntu4.5 is up to date
MySQL 5.5.40-0ubuntu0.14.04.1 is up to date
Image processing available
SUMMARY INFORMATION

Perch: 2.7.4, PHP: 5.5.9-1ubuntu4.5, MySQL: 5.5.40, with PDO
Server OS: Linux, fpm-fcgi
Installed apps: content (2.7.4), assets (2.7.4), categories (2.7.4), perch_events (1.9), perch_forms (1.8.2), perch_shop_foxycart (2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_events', 'perch_shop_foxycart', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/stylecars/www/perch
PERCH_CORE: /home/stylecars/www/perch/core
PERCH_RESFILEPATH: /home/stylecars/www/perch/resources
Image manipulation: GD
PHP limits: Max upload 16M, Max POST 16M, Memory: 256M, Total max file upload: 16M
Resource folder writeable: Yes
HTTP_HOST: stylecars.fr
DOCUMENT_ROOT: /home/stylecars/www
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Christophe Cussigh-Denis

Christophe Cussigh-Denis 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

If you turn on debug, do you get any errors when that happens?

Here is the message (unknown column). My knowledge in MySQL is very low... How can I fix it ?

Debug Message
SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='9f2dd6ba3f61c066a33f7397cf5f3184' LIMIT 1
UPDATE perch2_users SET userHash='8e707a66028e415f9383c6a224211f1f' WHERE userID=1
SELECT p.privKey FROM perch2_user_privileges p
SELECT * FROM (SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID
SELECT * FROM perch2_shop_categories ORDER BY categoryTitle ASC
Using template: /templates/shop/product.html
SELECT * FROM perch2_resources WHERE resourceID='982' LIMIT 1
SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='982' AND resourceKey='thumb'
SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='982' AND resourceTargetWidth=800 AND resourceTargetHeight=0 AND resourceCrop=0 AND resourceDensity=1
Resizing image... (gd, w800 h0 @1x )
SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='982' AND resourceTargetWidth=600 AND resourceTargetHeight=600 AND resourceCrop=0 AND resourceDensity=2
Resizing image... (gd, w600 h600 @2x )
SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='982' AND resourceTargetWidth=140 AND resourceTargetHeight=140 AND resourceCrop=1 AND resourceDensity=1
INSERT IGNORE INTO perch2_resources(resourceApp,resourceBucket,resourceFile,resourceKey,resourceParentID,resourceType,resourceCreated,resourceInLibrary,resourceTitle,resourceFileSize,resourceWidth,resourceHeight,resourceMimeType) VALUES('perch_shop_foxycart','default','img0337.jpg','orig',0,'jpg','2014-12-15 22:35:43','0','Img0337',2661992,3264,2448,'image/jpeg')
SELECT resourceID FROM perch2_resources WHERE resourceBucket='default' AND resourceFile='img0337.jpg' LIMIT 1
INSERT IGNORE INTO perch2_resources(resourceApp,resourceBucket,resourceFile,resourceKey,resourceParentID,resourceType,resourceCreated,resourceInLibrary,resourceWidth,resourceHeight,resourceTargetWidth,resourceTargetHeight,resourceDensity,resourceFileSize,resourceMimeType,resourceTitle) VALUES('perch_shop_foxycart','default','img0337-thumb.jpg','thumb','982','jpg','2014-12-15 22:35:43','0','150','112',150,150,2,4705,'','Img0337 thumb')
SELECT resourceID FROM perch2_resources WHERE resourceBucket='default' AND resourceFile='img0337-thumb.jpg' LIMIT 1
INSERT IGNORE INTO perch2_resources(resourceApp,resourceBucket,resourceFile,resourceKey,resourceParentID,resourceType,resourceCreated,resourceInLibrary,resourceWidth,resourceHeight,resourceTargetWidth,resourceTargetHeight,resourceCrop,resourceDensity,resourceFileSize,resourceMimeType,resourceTitle) VALUES('perch_shop_foxycart','default','img0337-w800.jpg','w800hc0','982','jpg','2014-12-15 22:35:43','0',800,600,'800','','0','1',100644,'image/jpeg','Img0337 w800')
SELECT resourceID FROM perch2_resources WHERE resourceBucket='default' AND resourceFile='img0337-w800.jpg' LIMIT 1
INSERT IGNORE INTO perch2_resources(resourceApp,resourceBucket,resourceFile,resourceKey,resourceParentID,resourceType,resourceCreated,resourceInLibrary,resourceWidth,resourceHeight,resourceTargetWidth,resourceTargetHeight,resourceCrop,resourceDensity,resourceFileSize,resourceMimeType,resourceTitle) VALUES('perch_shop_foxycart','default','img0337-w600h600@2x.jpg','w600h600c0@2x','982','jpg','2014-12-15 22:35:43','0',600,450,'600','600','0','2',216561,'image/jpeg','Img0337 w600h600@2x')
INSERT IGNORE INTO perch2_resources(resourceApp,resourceBucket,resourceFile,resourceKey,resourceParentID,resourceType,resourceCreated,resourceInLibrary,resourceWidth,resourceHeight,resourceTargetWidth,resourceTargetHeight,resourceCrop,resourceDensity,resourceFileSize,resourceMimeType,resourceTitle) VALUES('perch_shop_foxycart','default','img0337-w140h140.jpg','w140h140c1','982','jpg','2014-12-15 22:35:43','0','140','140','140','140','1','1',5510,'','Img0337 w140h140')
SELECT resourceID FROM perch2_resources WHERE resourceBucket='default' AND resourceFile='img0337-w140h140.jpg' LIMIT 1
SELECT * FROM perch2_shop_products WHERE productSlug= 'vehicule-de-test'
INSERT INTO perch2_shop_products(productTitle,productDescRaw,productCount,productStatus,productPrice,productFoxyCategory,productCode,productCountByOptions,productPriceByOptions,productDynamicFields,productDescHTML,productSlug) VALUES('Véhicule de test','Details','1','Live','5000','','1',0,0,'{\"productImage1\":{\"assetID\":\"982\",\"title\":\"Img0337\",\"_default\":\"\\/perch\\/resources\\/img0337.jpg\",\"bucket\":\"default\",\"path\":\"img0337.jpg\",\"size\":2661992,\"w\":3264,\"h\":2448,\"mime\":\"image\\/jpeg\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"112\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"img0337-thumb.jpg\",\"size\":4705,\"mime\":\"\"},\"w800hc0\":{\"w\":800,\"h\":600,\"target_w\":\"800\",\"target_h\":false,\"crop\":false,\"density\":\"1\",\"path\":\"img0337-w800.jpg\",\"size\":100644,\"mime\":\"image\\/jpeg\"},\"w600h600c0@2x\":{\"w\":600,\"h\":450,\"target_w\":\"600\",\"target_h\":\"600\",\"crop\":false,\"density\":\"2\",\"path\":\"img0337-w600h600@2x.jpg\",\"size\":216561,\"mime\":\"image\\/jpeg\"},\"w140h140c1\":{\"w\":\"140\",\"h\":\"140\",\"target_w\":\"140\",\"target_h\":\"140\",\"crop\":\"true\",\"density\":\"1\",\"path\":\"img0337-w140h140.jpg\",\"size\":5510,\"mime\":\"\"}}},\"productImage2\":null,\"productImage3\":null,\"productImage4\":null,\"productImage5\":null,\"product-price-att\":\"\",\"productDescHTML\":null,\"productShortDesc\":{\"raw\":\"Short desc.\",\"processed\":\"Short desc.\"}}','
Details
','vehicule-de-test')
Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'productFoxyCategory' in 'field list'
Queries: 25
Drew McLellan

Drew McLellan 2638 points
Perch Support

Was this originally the FoxyCart shop?

It was the first shop app, originaly named "perch_shop" (version 1 if I remember), so I updated the apps.php like mentioned here: https://grabaperch.com/add-ons/apps/shop-foxycart

Drew McLellan

Drew McLellan 2638 points
Perch Support

When you updated, did you see an update run?

I don't remember having seen any update message or confirmation. Should I downgrade to previous versions ? (I made a backup before update)

Drew McLellan

Drew McLellan 2638 points
Perch Support

It could be worth a try. I"m not overly familiar with this app, but I'll see what I can find out.

I've downgraded to old version (perch and shop app) and it works (but I'm still with old version of Perch and apps). Here is diagnostic page for info.

If you have a solution so I can update safely, tell me ;)

PERCH INFORMATION

Perch: 2.1.4
Production mode: Production (100)
Installed apps: content (2.1.4), perch_forms (1,5), perch_events (1.7), perch_shop (1.0)
DB driver: PDO
DB tables: perch2_content_index, perch2_content_items, perch2_content_regions, perch2_content_resources, perch2_events, perch2_events_categories, perch2_events_to_categories, perch2_forms, perch2_forms_responses, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resources, perch2_scheduled_tasks, perch2_settings, perch2_shop_categories, perch2_shop_log, perch2_shop_orders, perch2_shop_product_options, perch2_shop_products, perch2_shop_products_to_categories, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 3
App runtimes:
<?php
    include(PERCH_PATH.'/core/apps/content/runtime.php');
    include(PERCH_PATH.'/addons/apps/perch_shop/runtime.php');
    include(PERCH_PATH.'/addons/apps/perch_forms/runtime.php');
    include(PERCH_PATH.'/addons/apps/perch_events/runtime.php');
?>
Editor plug-ins: markitup
H1: 6a3649f155f889323913f35ffd0dafea
L1: 8350a0fa732a97849f27facaed2e8688
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: fr-fr
update_2.1.4: done
headerScheme: light
perch_shop_paypal_email:
perch_shop_product_url: /shop/product.php?s={productSlug}
perch_events_detail_url: /events/event.php?event={eventSlug}
dashboard: 0
content_hideNonEditableRegions: 0
perch_shop_display_oos: 0
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: stylecars
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: stylecars
PERCH_DB_PREFIX: perch2_
PERCH_TZ: Europe/Paris
PERCH_EMAIL_FROM: contact@stylecars.fr
PERCH_EMAIL_FROM_NAME: Style Cars
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/stylecars/www/perch
PERCH_CORE: /home/stylecars/www/perch/core
PERCH_RESFILEPATH: /home/stylecars/www/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_SCHEDULE_SECRET: voiture
PERCH_ERROR_MODE: DIE
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/stylecars/www/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
HOSTING SETTINGS

PHP: 5.5.9-1ubuntu4.5
Zend: 2.5.0
OS: Linux
SAPI: fpm-fcgi
Safe mode: not detected
MySQL client: 5.5.40
MySQL server: 5.5.40-0ubuntu0.14.04.1
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, dba, dom, hash, fileinfo, filter, ftp, gettext, SPL, iconv, mbstring, session, posix, Reflection, standard, shmop, SimpleXML, soap, sockets, Phar, exif, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, cgi-fcgi, PDO, apcu, curl, gd, intl, json, mcrypt, memcache, mysql, mysqli, pdo_mysql, pdo_sqlite, pspell, readline, sqlite3, mhash, apc, Zend OPcache
GD: Yes
ImageMagick: No
PHP max upload size: 16M
PHP max form post size: 16M
PHP memory limit: 256M
Total max uploadable file size: 16M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
USER: stylecars
HOME: /home/stylecars
FCGI_ROLE: RESPONDER
proxy-nokeepalive: 1
HTTP_HOST: stylecars.fr
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: __utma=235982275.1512996292.1390317323.1418670770.1418729852.54; __utmb=235982275.12.10.1418729852; __utmc=235982275; __utmt=1; __utmz=235982275.1390317323.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); cmsa=1; PHPSESSID=jc3thdgdfdn1kq8nvfg2pbh5u5
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.1.17 (KHTML, like Gecko) Version/7.1 Safari/537.85.10
HTTP_ACCEPT_LANGUAGE: fr-fr
HTTP_REFERER: https://stylecars.fr/perch/core/settings/
HTTP_ACCEPT_ENCODING: gzip, deflate
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_SOFTWARE: Apache/2.4.10 (Ubuntu)
SERVER_NAME: stylecars.fr
SERVER_ADDR: 195.154.243.41
SERVER_PORT: 80
REMOTE_ADDR: 82.244.232.228
DOCUMENT_ROOT: /home/stylecars/www
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: /home/stylecars/www
SERVER_ADMIN: webmaster@stylecars.fr
SCRIPT_FILENAME: /home/stylecars/www/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 62664
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1418730112,6063
REQUEST_TIME: 1418730112
Drew McLellan

Drew McLellan 2638 points
Perch Support

I'll have a look into it and see what I can come up with.