# |
Sep 5th 2019, 06:38 |
alexdd55976 |
what happens if you set the DB field to unique? |
# |
Sep 5th 2019, 06:24 |
conehead |
Summary: Cake tries to create joinData although it already exists |
# |
Sep 5th 2019, 06:20 |
conehead |
Good gosh. Same old error just popped up. Anyone working with joinData? I am trying to save my entity with a `tag` (join table `tagged`) The entity, the `tag` entity and the tagged `entity` are `[new] = false` and have the appropriate ids. Still when I am trying to save the entity, cake tries to create new joinData, which results in a duplicate unique key error. Slowly I am out of ideas. (using https://github.com/dereuromark/cakephp-tags) |
# |
Sep 5th 2019, 05:44 |
conehead |
morning |
# |
Sep 5th 2019, 05:36 |
alexdd55976 |
Morning |
# |
Sep 5th 2019, 05:33 |
javier.villanueva |
morning all |
# |
Sep 5th 2019, 05:23 |
conehead |
@dereuromark I was never really aware of the command support of PHPStorm. Maybe this would be another nice enhancement for your ide helper? https://github.com/skie/PhpStorm At least for me this is not working anymore unfortunately |
# |
Sep 5th 2019, 02:32 |
Fastidius |
cheers. New to cake so making sure my thought process isn't flawed before going down a rabbit hole |
# |
Sep 5th 2019, 02:30 |
challgren |
When you do your first post via ajax return the id on save and update the js to have the id and then issue “edits” to update the entity |
# |
Sep 5th 2019, 02:30 |
Fastidius |
ok so i can java script it but then i need the post to not create a new entity just patch the existing ie treat it like an edit? |
# |
Sep 5th 2019, 02:28 |
admad |
that's a JavaScript issue not a PHP one |
# |
Sep 5th 2019, 02:23 |
Fastidius |
Hi all, Interesting problem i am trying to resolve. Have a form which people submit in but they also sometimes click away to other websites and lose their work in progress. is there a way to auto post a form in cake so it works like an auto save function? |
# |
Sep 4th 2019, 23:28 |
challgren |
I misunderstood how the annotations worked, I assumed it looked in the controller |
# |
Sep 4th 2019, 23:28 |
challgren |
Make senses |
# |
Sep 4th 2019, 23:28 |
challgren |
Ahh ok |
# |
Sep 4th 2019, 23:27 |
dereuromark |
your example is invalid as magic var dont have to annotated if they are not directly used. no point. |
# |
Sep 4th 2019, 23:27 |
dereuromark |
yeah, only real variables count at this point. |
# |
Sep 4th 2019, 23:26 |
challgren |
Just did |
# |
Sep 4th 2019, 23:26 |
dereuromark |
please update the ticket accordinly to be balid |
# |
Sep 4th 2019, 23:24 |
challgren |
But yeah I think its missed due to cake’s voodoo |
# |
Sep 4th 2019, 23:19 |
challgren |
Well at least its annotating them so I can fix them |
# |
Sep 4th 2019, 23:18 |
challgren |
I’m letting cakes magic use the incentiveMeasures |
# |
Sep 4th 2019, 23:18 |
challgren |
Yeah in the template I’ |
# |
Sep 4th 2019, 23:12 |
challgren |
Ok it may just be sloppy code |
# |
Sep 4th 2019, 23:17 |
challgren |
Ohh I thought it looked at the controller than made its guesses |
# |
Sep 4th 2019, 23:17 |
dereuromark |
you can assign randomly templates to controllers/actions |
# |
Sep 4th 2019, 23:16 |
dereuromark |
nothing else would work in cake |
# |
Sep 4th 2019, 23:16 |
dereuromark |
of course |
# |
Sep 4th 2019, 23:16 |
challgren |
So it just read the stuff in the template? |
# |
Sep 4th 2019, 23:16 |
challgren |
? |
# |
Sep 4th 2019, 23:16 |
challgren |
$incentiveMeasurements |
# |
Sep 4th 2019, 23:16 |
dereuromark |
you failed to display the template code |
# |
Sep 4th 2019, 23:15 |
dereuromark |
the controller is not relevant here |
# |
Sep 4th 2019, 23:15 |
dereuromark |
which inside the template is missed? |
# |
Sep 4th 2019, 23:15 |
challgren |
https://github.com/dereuromark/cakephp-ide-helper/issues/144 |
# |
Sep 4th 2019, 23:12 |
challgren |
I’ll open a ticket |
# |
Sep 4th 2019, 23:08 |
dereuromark |
you can open ticket on the missed ones, which ones would those be? some code snippets please |
# |
Sep 4th 2019, 23:08 |
dereuromark |
token list can only do so much ;) you can add AST if you want |
# |
Sep 4th 2019, 23:06 |
challgren |
And a few missed vars on templates |
# |
Sep 4th 2019, 23:03 |
challgren |
Quite a bit of mixed annotations added |
# |
Sep 4th 2019, 22:54 |
challgren |
O_o |