# |
Sep 19th 2019, 20:15 |
daniel.upshaw |
Oh, like the login page itself |
# |
Sep 19th 2019, 20:15 |
challgren |
Is your login page configured to allow all users? |
# |
Sep 19th 2019, 20:13 |
slackebot |
<daniel.upshaw> |
# |
Sep 19th 2019, 20:13 |
daniel.upshaw |
Looks like it's doubling it somewhere, that's odd |
# |
Sep 19th 2019, 20:12 |
felipe.marinho |
I have an application that suddenly started to give me errors in the login, this message: ```URL mismatch in POST data (expected '/users/login?url=users/login' but found '/users/login?url=users/loginandurl=users/login')``` This is strange, because I don't change anything on this application... |
# |
Sep 19th 2019, 20:10 |
daniel.upshaw |
Probably set it in there instead, actually |
# |
Sep 19th 2019, 20:10 |
daniel.upshaw |
`'defaultLocale'` |
# |
Sep 19th 2019, 20:10 |
slackebot |
'fullBaseUrl' => false, 'imageBaseUrl' => 'img/', 'cssBaseUrl' => 'css/', 'jsBaseUrl' => 'js/', 'paths' => [ 'plugins' => [ROOT . DS . 'plugins' . DS], 'templates' => [APP . 'Template' . DS], 'locales' => [APP . 'Locale' . DS], ], ],``` |
# |
Sep 19th 2019, 20:10 |
daniel.upshaw |
See this section of your `app.php` config:``` 'App' => [ 'namespace' => 'App', 'encoding' => env('APP_ENCODING', 'UTF-8'), 'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'), 'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'UTC'), 'base' => false, 'dir' => 'src', 'webroot' => 'webroot', 'wwwRoot' => WWW_ROOT, //'baseUrl' => env('SCRIPT_NAME'), |
# |
Sep 19th 2019, 20:09 |
daniel.upshaw |
It would probably automatically localize it for you |
# |
Sep 19th 2019, 20:09 |
daniel.upshaw |
Hmmm, I've never had to change that part... but I wonder if this section of the docs would do it: https://book.cakephp.org/3.0/en/core-libraries/internationalization-and-localization.html#localizing-dates-and-numbers |
# |
Sep 19th 2019, 20:06 |
slackebot |
{{minute}} {{second}} {{meridian}}', ]; |
# |
Sep 19th 2019, 20:06 |
luizcmarin |
(* using google.translate) I will enjoy for two more boring items that I am researching since yesterday: change the date and time format for Brazil: (if I'm right, it's not a good idea to tinker with the core as a new update will overwrite my changes) return [ 'dateWidget' => '{{year}} {{month}} {{day}} {{hour}} {{minute}} {{second}} {{meridian}}', ]; For: return [ 'dateWidget' => '{{day}} {{month}} {{year}} {{hour}} |
# |
Sep 19th 2019, 20:02 |
daniel.upshaw |
:slightly_smiling_face: |
# |
Sep 19th 2019, 20:02 |
luizcmarin |
yes! thanks. basics.php its perfect |
# |
Sep 19th 2019, 20:00 |
daniel.upshaw |
See the edit, I had the wrong const |
# |
Sep 19th 2019, 19:59 |
daniel.upshaw |
That's similar to what Cake does in core with `basics.php` |
# |
Sep 19th 2019, 19:59 |
daniel.upshaw |
`require(APP_DIR . '/functions.php');` |
# |
Sep 19th 2019, 19:58 |
daniel.upshaw |
Ah okay, yes, check out that thread of replies.. I think the best bet is to make it in something like `./src/functions.php`, then require it in `bootstrap.php` |
# |
Sep 19th 2019, 19:57 |
luizcmarin |
Dan: are just generic functions, example: functionDateLong (), April 23, 2019 (example), functionMoney () return '23 mil and 23 cents', .... |
# |
Sep 19th 2019, 19:53 |
daniel.upshaw |
Probably the best bet is to require it in your `bootstrap.php` like Cake core does with its `src/basics.php` |
# |
Sep 19th 2019, 19:52 |
daniel.upshaw |
See also `vendor/cakephp/cakephp/src/Core/functions.php` Which is loaded via `/vendor/cakephp/cakephp/composer.json` ``` "files": [ "src/Core/functions.php", "src/Collection/functions.php", "src/I18n/functions.php", "src/Utility/bootstrap.php" ]``` |
# |
Sep 19th 2019, 19:50 |
daniel.upshaw |
Which is located in `vendor/cakephp/cakephp/src/basics.php` |
# |
Sep 19th 2019, 19:49 |
daniel.upshaw |
Check out `vendor/cakephp/config/bootstrap.php` line 19: ```require CAKE . 'basics.php';``` |
# |
Sep 19th 2019, 19:46 |
luizcmarin |
good afternoon, after about 10 hours searching google ... :( ... I want to create a file with general functions for my application. How can I do this? I think it's simple, but I'm not used to cakephp's naming. Could you give some tips? I appreciate help. |
# |
Sep 19th 2019, 19:44 |
daniel.upshaw |
Maybe the "Remember Me" cookie field is not unlocked by default |
# |
Sep 19th 2019, 19:43 |
slackebot |
if (Configure::read('debug')) { $msg = $this->_debugPostTokenNotMatching($controller, $hashParts); } throw new AuthSecurityException($msg); }``` |
# |
Sep 19th 2019, 19:43 |
daniel.upshaw |
The `hash_equals` function keeps returning `false`:``` protected function _validatePost(Controller $controller) { $token = $this->_validToken($controller); $hashParts = $this->_hashParts($controller); $check = hash_hmac('sha1', implode('', $hashParts), Security::getSalt()); if (hash_equals($check, $token)) { return true; } $msg = self::DEFAULT_EXCEPTION_MESSAGE; |
# |
Sep 19th 2019, 19:42 |
daniel.upshaw |
I'm surprised more people aren't seeing it |
# |
Sep 19th 2019, 19:42 |
daniel.upshaw |
Bad Request on form submit (login form) |
# |
Sep 19th 2019, 19:41 |
daniel.upshaw |
While following the documentation on Authentication, currently while trying the latest CakeDC/Users |
# |
Sep 19th 2019, 19:41 |
daniel.upshaw |
Mannn, I am running into this all the time recently: https://github.com/cakephp/cakephp/issues/12086 |
# |
Sep 19th 2019, 19:23 |
jotpe |
Cu guys |
# |
Sep 19th 2019, 18:58 |
jotpe |
I also don't use the decorator, my User implements the AuthInterface |
# |
Sep 19th 2019, 18:58 |
ron.rattie |
definitely |
# |
Sep 19th 2019, 18:58 |
ricksaccous |
@ron.rattie are you missing that? lolll |
# |
Sep 19th 2019, 18:58 |
jotpe |
Cheers ;) |
# |
Sep 19th 2019, 18:58 |
jotpe |
:coffee: |
# |
Sep 19th 2019, 18:58 |
ricksaccous |
@jotpe good luck |
# |
Sep 19th 2019, 18:58 |
ricksaccous |
so i don't know why you wouldn't be |
# |
Sep 19th 2019, 18:57 |
ron.rattie |
@ricksaccous |