Log message #4183737

# At Username Text
# Apr 18th 2019, 05:51 kanryu hi,
# Apr 17th 2019, 20:53 rightscoreanalysis the catch works as i need
# Apr 17th 2019, 20:52 rightscoreanalysis @ricksaccous thnaks buildRules and isUnique worked perfectly
# Apr 17th 2019, 20:38 rightscoreanalysis but the issue is the PDO renders an error page
# Apr 17th 2019, 20:38 ricksaccous via buildRules
# Apr 17th 2019, 20:38 ricksaccous avoiding the exception is best imo which you can do
# Apr 17th 2019, 20:38 rightscoreanalysis I have a try catch in place
# Apr 17th 2019, 20:37 ricksaccous you could always try catch but i think there is a way to change it
# Apr 17th 2019, 20:36 rightscoreanalysis hmm, there must be a way to change the exception behaviour
# Apr 17th 2019, 20:03 ricksaccous yeah but i recommend doing both
# Apr 17th 2019, 20:02 rightscoreanalysis Oh so this would enable me to by-pass setting up fk constraints at db level and use Cake to check
# Apr 17th 2019, 20:01 rightscoreanalysis seems a 500 error is thrown, can I force this error to use my own custom excpetio which I have setup
# Apr 17th 2019, 20:01 ricksaccous and existsIn
# Apr 17th 2019, 20:01 ricksaccous use buildRules
# Apr 17th 2019, 19:57 rightscoreanalysis .. with the default cake error view
# Apr 17th 2019, 19:57 rightscoreanalysis Is there a way to elegantly catch PDO exception, I'm using the CRUD plugin and if I test a call with fails due to a fk constraint the request die ungracefully
# Apr 17th 2019, 17:37 dereuromark `bin/cake upgrade skeleton -f path/to/app`
# Apr 17th 2019, 17:36 dereuromark I thought you meant for local copy or deploy. here you should use composer only.
# Apr 17th 2019, 17:35 dereuromark you when for upgrading? here copying it over (using e.g. my upgrade skeleton command) is fine of course
# Apr 17th 2019, 17:35 cpierce @ricksaccous yes my skeleton was outdated - i'm not sure how to correct that without copying though
# Apr 17th 2019, 17:34 cpierce @dereuromark what is the preferred way of getting newer updated files in your app then?
# Apr 17th 2019, 17:33 ricksaccous but i see what you mean
# Apr 17th 2019, 17:33 ricksaccous i think his issue was an outdated app skeleton
# Apr 17th 2019, 17:33 ricksaccous oh
# Apr 17th 2019, 17:33 ricksaccous i'm a serial copy paster
# Apr 17th 2019, 17:33 dereuromark inside php and deployment of such composer files you can easily screw up the paths in the cached files
# Apr 17th 2019, 17:32 ricksaccous @dereuromark my dev lead would have loved to hear you say that
# Apr 17th 2019, 17:29 dereuromark recipe for failure
# Apr 17th 2019, 17:29 dereuromark never copy anything
# Apr 17th 2019, 17:20 cpierce i forgot to copy new cake files to the bin folder
# Apr 17th 2019, 17:20 cpierce ahh found it
# Apr 17th 2019, 17:18 cpierce i don't know what i've done worng - i was just updating to the latest version
# Apr 17th 2019, 17:18 cpierce it's still broken
# Apr 17th 2019, 17:14 cpierce and had composer pull it again
# Apr 17th 2019, 17:14 cpierce i deleted vendor folder
# Apr 17th 2019, 17:13 admad You have somehow messed up autoloading
# Apr 17th 2019, 17:12 cpierce no
# Apr 17th 2019, 17:12 dereuromark are you testing a plugin?
# Apr 17th 2019, 17:11 cpierce anyone help me out on the cause of this issue? ... obviously it's referencing it in the vendor file so i'd assume i'm missing something that should be installed
# Apr 17th 2019, 17:10 cpierce ```./bin/cake PHP Fatal error: Uncaught Error: Class 'Cake\Routing\Router' not found in /var/www/cpierce-testing/vendor/cakephp/cakephp/config/bootstrap.php:22 Stack trace: #0 /var/www/cpierce-testing/config/bootstrap.php(30): require() #1 /var/www/cpierce-testing/bin/cake.php(31): include('/var/www/cpierc...') #2 {main} thrown in /var/www/cpierce-testing/vendor/cakephp/cakephp/config/bootstrap.php on line 22```
# Apr 17th 2019, 16:27 ksc To explain what i try to do: I try to increment an order number based on one client. -> pair of "client_id" and "order_nbr" should be unique. I call a generateOrderNbr function in the beforeSave() function of my orders table. I tried the buildrules, but this doesn't work: $rules->add($rules->isUnique(['client_id', 'order_nbr'], _('Order No. has to be unique.')));