Log message #4101587

# At Username Text
# Dec 6th 2017, 17:08 rbl222 NULL::character varying
# Dec 6th 2017, 17:08 rbl222 Should cake not detect NULL::character as a valid default?
# Dec 6th 2017, 17:08 rbl222 Does anyone know how I would have CakePHP detect DEFAULT NULL::character varying; correctly as a default, and not interpret it as a 'string' default? I currently get an error when saving a record as cake inserts 'NULL::character varying' as a string thinking it is the default...
# Dec 6th 2017, 16:23 admad Still haven't dug into it
# Dec 6th 2017, 16:09 inoas admad did the things help you out with http2+pagespeed?
# Dec 6th 2017, 15:50 dereuromark over two years ago I outlined some of the key ingredients IMO: http://www.dereuromark.de/2015/06/06/cakephp-3-0-migration-notes/
# Dec 6th 2017, 15:49 dereuromark Well it is still the same bit of work probably. But with good preparation, smart coding for the last 2+ years it is not that hard usually.
# Dec 6th 2017, 15:49 tomicapo Apart from this, is migrating to v3.x still as complicated as it was some months ago?
# Dec 6th 2017, 15:46 tomicapo Thanks @dereuromark I'll write again if I find the user cron runs with is the correct one and has permission.
# Dec 6th 2017, 15:46 tomicapo Just wanted to check here since I found an issue on github for an earlier version referencing this L10n class.
# Dec 6th 2017, 15:45 tomicapo I will investigate what user cron runs with. Maybe it's a cPanel issue....
# Dec 6th 2017, 15:45 dereuromark yeah that wont make any difference, it cant load the file for other reasons.
# Dec 6th 2017, 15:44 tomicapo I tried to downgrade to 2.10.4 but the error still occured.
# Dec 6th 2017, 15:44 dereuromark interesting, then it should find it just fine still.
# Dec 6th 2017, 15:44 tomicapo Cake is installed via composer.
# Dec 6th 2017, 15:44 tomicapo This is not a new installation. It has been working for years.
# Dec 6th 2017, 15:44 tomicapo The line is present and ok.
# Dec 6th 2017, 15:43 dereuromark most common beginner mistake is to run shell commands or cronjobs with root user or a non-www-data one, killing not only cache but also file structure, also for deploy should usually be the www-data one.
# Dec 6th 2017, 15:43 dereuromark could also have the wrong permissions, so it cannot read that file. make sure they have the same user as cronjob, usually the group of www-data :slightly_smiling_face:
# Dec 6th 2017, 15:41 dereuromark See https://github.com/cakephp/cakephp/blob/2.x/lib/Cake/I18n/I18n.php#L20 thats how the file should look like
# Dec 6th 2017, 15:40 dereuromark What does your I18n contain? Does it miss the L10n use statement? Maybe you are using an outdated 2.x file?
# Dec 6th 2017, 15:36 tomicapo File uploaded https://cakesf.slack.com/files/U1USW7KLP/F8BKUG1FZ/-.php / https://slack-files.com/T053DPNCM-F8BKUG1FZ-bcd63bfc67
# Dec 6th 2017, 15:35 tomicapo I'm debugging with just that and I get the error above.
# Dec 6th 2017, 15:34 tomicapo I don't think there's anything I should use App:uses() for...
# Dec 6th 2017, 15:34 tomicapo Actually, my shell's main method only contains: $this->log('test'); exit;
# Dec 6th 2017, 15:33 tomicapo I guess... Let me check.
# Dec 6th 2017, 15:33 dereuromark missing to do so would explain it, it is similar to modern use statements, always all used classes per file, no exceptions :slightly_smiling_face:
# Dec 6th 2017, 15:33 dereuromark @tomicapo Are you properly App::uses() all your used classes per file?
# Dec 6th 2017, 15:32 dereuromark never heard of this :c... thing
# Dec 6th 2017, 15:32 dereuromark rbl222 most likely, yeah
# Dec 6th 2017, 15:31 tomicapo :s
# Dec 6th 2017, 15:31 tomicapo This only happens when the console task is invoked by cron.
# Dec 6th 2017, 15:31 tomicapo Any ideas?
# Dec 6th 2017, 15:30 tomicapo PHP v 7.1 (cPanel provided)
# Dec 6th 2017, 15:30 slackebot ConsoleErrorHandler->handleException(Object(Error)) #5 {main} thrown in /home/pezca/public_html/app/vendor/cakephp/cakephp/lib/Cake/I18n/I18n.php on line 163
# Dec 6th 2017, 15:30 slackebot /home/pezca/public_html/app/vendor/cakephp/cakephp/lib/Cake/I18n/I18n.php(198): I18n::getInstance() #2 /home/pezca/public_html/app/vendor/cakephp/cakephp/lib/Cake/basics.php(636): I18n::translate('<error>Error:</...', NULL, 'cake_console') #3 /home/pezca/public_html/app/vendor/cakephp/cakephp/lib/Cake/Console/ConsoleErrorHandler.php(59): __d('cake_console', '<error>Error:</...', 'Class 'I18n' no...', '#0 /home/pezca/...') #4 [internal function]:
# Dec 6th 2017, 15:30 tomicapo Hi, I'm having a problem running a console task on CakePHP 2.10.5 on a linux server. This was working fine until suddenly I started seeing errors in the log File. This is the error: PHP Fatal error: Uncaught Error: Class 'L10n' not found in /home/pezca/public_html/app/vendor/cakephp/cakephp/lib/Cake/I18n/I18n.php:163 Stack trace: #0 /home/pezca/public_html/app/vendor/cakephp/cakephp/lib/Cake/I18n/I18n.php(174): I18n->__construct() #1
# Dec 6th 2017, 15:28 rbl222 I'm wondering if I set my charvar defaults to DEFAULT NULL instead of DEFAULT NULLL::character varying would be easier?
# Dec 6th 2017, 15:24 dereuromark Sry, this one: https://github.com/dereuromark/cakephp-shim/blob/master/src/Database/Type/JsonType.php
# Dec 6th 2017, 15:24 dereuromark but it would sure be better to have a core improvement here (for BC probably safer to go for 3.6 then)
# Dec 6th 2017, 15:23 dereuromark @rbl222 for json type I fixed it in https://github.com/dereuromark/cakephp-shim/blob/master/src/Model/Behavior/NullableBehavior.php