# |
Jul 2nd 2019, 10:15 |
conehead |
Well challgren I now changed database default to `utf8_general_ci` Probably not the best solution, but it seems to work now |
# |
Jul 2nd 2019, 10:07 |
challgren |
Nice thats probably the best solution cake 2 is old code and most of us forgot it |
# |
Jul 2nd 2019, 09:56 |
Ecorce |
Finalement I went for a simple solution: passing variables into the Session, then extract them in the error view. |
# |
Jul 2nd 2019, 09:54 |
conehead |
But you are using these settings? `'encoding' => 'utf8mb4',` And for the database `utf8mb4_unicode_ci`? Thank you very much for your support by the way |
# |
Jul 2nd 2019, 09:53 |
conehead |
I removed all migrations. Just added 2 migrations with up and creating a table. First is utf8_general and next is mb4.... |
# |
Jul 2nd 2019, 09:50 |
challgren |
Weird, I looked at all my migrations and I never once specified the collation and on production everything is correct. |
# |
Jul 2nd 2019, 09:46 |
conehead |
@challgren This is getting more and more weird. In app.php I got `'encoding' => 'utf8mb4',` Database has `utf8mb4_unicode_ci` First tables are created with `utf8_general_ci` and then later they are created with `utf8mb4_unicode_ci` |
# |
Jul 2nd 2019, 09:44 |
ndm |
@Exorce The exception renderer instantiates a new controller, hence your data isn't available. You could for example use a custom/extended exception that can be fed with additional data. The exception is available in view as `$error`. |
# |
Jul 2nd 2019, 09:33 |
Ecorce |
Working on a NotFoundException (CakePHP 2.3.9), I try to set vars to the view but ther error handler seem to remove them. How can I pass vars to the view? |
# |
Jul 2nd 2019, 09:32 |
Ecorce |
Hello there! |
# |
Jul 2nd 2019, 09:30 |
challgren |
Well utf8mb4 is larger so you may need to rekey some TEXT fields |
# |
Jul 2nd 2019, 09:30 |
conehead |
Getting more and more strange: `utf8mb4` gives me an error during one migration `Specified key was too long; max key length is 767 bytes` `utf8_general_ci` seems to be working fine. But I'd prefer `utf8mb4` |
# |
Jul 2nd 2019, 09:25 |
challgren |
weird |
# |
Jul 2nd 2019, 09:24 |
conehead |
But I cannot really reproduce it :P |
# |
Jul 2nd 2019, 09:24 |
conehead |
Should create a simple example first |
# |
Jul 2nd 2019, 09:23 |
challgren |
Weird, I’d suggest opening an issue at https://github.com/cakephp/migrations |
# |
Jul 2nd 2019, 09:22 |
conehead |
Errm actually before those 2 migrations, there are 3 more that are executed correctly |
# |
Jul 2nd 2019, 09:21 |
challgren |
My guess is the first table creates with the defaults and then something resets the collation and it defaults the to the db |
# |
Jul 2nd 2019, 09:21 |
conehead |
Yep I will. Still wondering why this is happening at all |
# |
Jul 2nd 2019, 09:21 |
challgren |
Set the db to utf8 and try again |
# |
Jul 2nd 2019, 09:19 |
conehead |
second is swedish |
# |
Jul 2nd 2019, 09:19 |
conehead |
First is utf8 |
# |
Jul 2nd 2019, 09:19 |
conehead |
strange thing is... I created 2 Migrations. Just ``` Migration1: $this->table('a') ->create(); Migration2: $this->table('b') ->create(); ``` |
# |
Jul 2nd 2019, 09:18 |
challgren |
I personally use utf8mb4 as my default and in my app.conf |
# |
Jul 2nd 2019, 09:18 |
conehead |
well or incorrect |
# |
Jul 2nd 2019, 09:18 |
conehead |
its swedish_ci thats correct |
# |
Jul 2nd 2019, 09:17 |
conehead |
Yep I know |
# |
Jul 2nd 2019, 09:16 |
challgren |
And by default I mean on the db itself not in app.php |
# |
Jul 2nd 2019, 09:16 |
conehead |
One second. Trying to nail it down |
# |
Jul 2nd 2019, 09:14 |
challgren |
Whats your database default? |
# |
Jul 2nd 2019, 09:12 |
conehead |
Yes, I am trying to find out why it switches at some point. but it does only switch for some forms |
# |
Jul 2nd 2019, 09:12 |
challgren |
http://docs.phinx.org/en/latest/migrations.html#creating-a-table |
# |
Jul 2nd 2019, 09:11 |
challgren |
PHinx defaults to utf8_general_ci |
# |
Jul 2nd 2019, 09:11 |
conehead |
This seems totally random |
# |
Jul 2nd 2019, 09:08 |
challgren |
@conehead try setting the ‘collation’ in the migration file |
# |
Jul 2nd 2019, 09:00 |
conehead |
what the? Some migrations create `latin1_swedish_ci` tables and some create `utf8_general_ci` tables. It is not hardcoded anywhere |
# |
Jul 2nd 2019, 08:17 |
mlllllllllllllll |
. |
# |
Jul 2nd 2019, 06:02 |
conehead |
Got it, sorry. My mistake |
# |
Jul 2nd 2019, 05:44 |
conehead |
Ah |
# |
Jul 2nd 2019, 05:41 |
conehead |
I have a single page with multiple forms to edit/delete entities with ajax. I am able to delete a first entity (no matter which one), but when I try to delete the second one, I get csrf token mismatch |
# |
Jul 2nd 2019, 05:34 |
admad |
@conehead same csrf token is used throughout the session |