Forum

Thread tagged as: Error, Addons, Shop

No statuses. This is the debug message on that page:

Debug Message
[1] 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='8f2e89be0935e79bc38bc134554e9927' LIMIT 1
UPDATE perch2_users SET userHash='e68db2b6f8fa32400f6250ca575609e2' WHERE userID='1'
[77] SELECT p.privKey FROM perch2_user_privileges p
[34] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
[nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_shop_order_statuses WHERE 1=1 AND statusDeleted IS NULL ORDER BY statusIndex ASC LIMIT 0, 24
[0] SELECT FOUND_ROWS() AS `count`
[nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_shop_order_statuses WHERE 1=1 AND statusDeleted IS NULL ORDER BY statusIndex ASC LIMIT 0, 24
[0] SELECT FOUND_ROWS() AS `count`
Queries: 9
Memory: 3.6582
Array
(
    [type] => 8
    [message] => Use of undefined constant PERCH_SHOP_VERSION - assumed 'PERCH_SHOP_VERSION'
    [file] => /var/www/vhosts/lockstock.biz/httpdocs/perch/addons/apps/perch_shop_products/admin.php
    [line] => 3
)

Should I add some statuses manually? If so, what should they be?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, so it sounds like part of the install failed - possibly due to similar issues. Can you try the insert below? I'm expecting an error, but if you let me know what it is we can fix.

INSERT INTO `perch2_shop_order_statuses` (`statusID`, `statusKey`, `statusTitle`, `statusEditable`, `statusIndex`, `statusDynamicFields`, `statusCreated`, `statusUpdated`, `statusDeleted`, `statusActive`)
VALUES
    (1,'created','Created',0,0,'[]','0000-00-00 00:00:00','2016-02-26 04:42:44',NULL,1),
    (2,'payment_failed','Payment failed',0,50,NULL,'0000-00-00 00:00:00','2016-02-26 04:39:44',NULL,1),
    (3,'paid','Paid',0,100,'[]','0000-00-00 00:00:00','2016-02-26 12:42:00',NULL,1),
    (4,'processing','Processing',0,150,NULL,'0000-00-00 00:00:00','2016-02-26 04:39:45',NULL,1),
    (5,'cancelled','Cancelled',0,200,NULL,'0000-00-00 00:00:00','2016-02-26 04:39:45',NULL,1),
    (6,'dispatched','Dispatched',0,250,NULL,'0000-00-00 00:00:00','2016-02-26 04:39:45',NULL,1),
    (7,'returned','Returned',0,300,NULL,'0000-00-00 00:00:00','2016-02-26 04:39:46',NULL,1),
    (8,'partial_refund','Partial refund',0,350,NULL,'0000-00-00 00:00:00','2016-02-26 04:39:46',NULL,1),
    (9,'refunded','Refunded',0,400,NULL,'0000-00-00 00:00:00','2016-02-26 04:39:47',NULL,1);

Hi Drew,

Thank you! With some minor tweaks (0000-00-00 00:00:00 was invalid for the statusCreated column) that did the trick.

Everything seems to be working now.

It definitely seemed something was up with the install process. That being said I attempted install on a few separate occasions and didn't receive any errors.

Anyway, thanks for all your help!

Drew McLellan

Drew McLellan 2638 points
Perch Support

I think your database is in some made super-strict mode where it's enforcing a bunch of special snowflake rules. We'll try and code around them!

Well if it helps with anything I was using the latest version of Homestead (https://laravel.com/docs/5.3/homestead) with Vagrant.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Testing with Homestead, I can't reproduce the behaviour you're seeing. What options do you have set in your Homestead.yaml file?

Sorry I missed this. Apart from my folders and sites everything is "out of the box":

ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

I use the same Homestead VM for several dev sites at the moment.

Drew McLellan

Drew McLellan 2638 points
Perch Support

So you're not using the MariaDB option?

No, I am not.