# |
Jan 8th 2020, 12:20 |
val |
@admad :( that would not make it easier to migrate from 2.x |
# |
Jan 8th 2020, 12:20 |
conehead |
Ah found a sweet little bug in Text::excerpt |
# |
Jan 8th 2020, 12:19 |
jotpe |
Thanks, @noel |
# |
Jan 8th 2020, 12:19 |
admad |
it's unlikely 3.x will have any new split packages, but it might be doable for 4.x |
# |
Jan 8th 2020, 12:18 |
val |
Hi, would it be possible to publish 3.x Mailer code as a separate package? Like https://github.com/cakephp/utility |
# |
Jan 8th 2020, 12:18 |
jotpe |
Ay, this works :+1: |
# |
Jan 8th 2020, 12:17 |
conehead |
Can you try: ```$addressTable->newEntity(['country' => 276], ['validate' => false]);``` |
# |
Jan 8th 2020, 12:17 |
conehead |
Ah |
# |
Jan 8th 2020, 12:15 |
slackebot |
<jotpe> |
# |
Jan 8th 2020, 12:14 |
jotpe |
It's this part: |
# |
Jan 8th 2020, 12:11 |
jotpe |
https://gist.github.com/julianpollmann/64fe2ea24e13d736400a321978637e67 |
# |
Jan 8th 2020, 12:11 |
conehead |
Shouldnt it be possible to skip the validation for get requests? |
# |
Jan 8th 2020, 12:09 |
jotpe |
For the Registration data the fields are not validated, for InvoiceAddress it does |
# |
Jan 8th 2020, 12:08 |
jotpe |
But It's associated data. Association looks like: Registrrations->Invoices->InvoiceAddresses |
# |
Jan 8th 2020, 12:08 |
jotpe |
And I'm not in the post section |
# |
Jan 8th 2020, 12:08 |
jotpe |
It's get |
# |
Jan 8th 2020, 12:08 |
conehead |
Do you open the form via get or post? |
# |
Jan 8th 2020, 12:07 |
conehead |
But shouldnt the validation only trigger when you post some data? |
# |
Jan 8th 2020, 12:07 |
conehead |
Well you could add a flag if the validation should be skipped |
# |
Jan 8th 2020, 12:00 |
jotpe |
Btw. You can leave out the path option, if it's '/' |
# |
Jan 8th 2020, 11:58 |
jotpe |
@damiano Do you have another route matching the "/" path? |
# |
Jan 8th 2020, 11:54 |
jotpe |
E.g. I created a Entity Adress and I create it with a Standard CountryCode (int), when the Form is shown all other fields contain error messages |
# |
Jan 8th 2020, 11:53 |
jotpe |
For a form I create a Entity which has just one field set, the others the User should set. Unfortunately all empty fields are validated and Empty Field Error Validation Messages are shown. How can I fix this? |
# |
Jan 8th 2020, 11:52 |
jotpe |
Hi, folks! |
# |
Jan 8th 2020, 11:15 |
damiano |
why? |
# |
Jan 8th 2020, 11:13 |
wizardfix |
Ok I'll do that once I have learnt more myself, as then will I have a better idea of what I think could be useful! :) |
# |
Jan 8th 2020, 11:11 |
damiano |
`public function routes(RouteBuilder $routes): void` `{` `$routes->plugin(` `'Webhook',` `['path' => '/',],` `function (RouteBuilder $builder) {` `// Add custom routes here` `$builder->connect('/{controller}/{action}/*', [])->setHost('test.localhost');` `}` `);` `parent::routes($routes);` `}` |
# |
Jan 8th 2020, 11:11 |
damiano |
but i do not need a path i only need to use the host |
# |
Jan 8th 2020, 11:10 |
damiano |
if i put something like /webhook it works |
# |
Jan 8th 2020, 11:10 |
damiano |
$routes->plugin( 'Webhook', ['path' => '/',], <------ here |
# |
Jan 8th 2020, 11:10 |
damiano |
why does not work: |
# |
Jan 8th 2020, 11:10 |
damiano |
hi |
# |
Jan 8th 2020, 11:09 |
savant |
that will definitely help us better document the plugin for other users :) |
# |
Jan 8th 2020, 11:09 |
savant |
But please file an issue in the bake repo with the docs you think are missing/examples of what you’d expect |
# |
Jan 8th 2020, 11:07 |
wizardfix |
Ok I'll have a look at those resources, thanks for your help @savant. :) |
# |
Jan 8th 2020, 11:06 |
savant |
Apologies if it seems like I’m being dismissive, just trying to figure out what sort of content you want and not really understanding |
# |
Jan 8th 2020, 11:04 |
savant |
i wonder if maybe the content from https://dev.to/northgoingzax/cakephp-3-bake-by-example-40pp might be more helpful to add to our docs… |
# |
Jan 8th 2020, 11:03 |
savant |
the 1.3 docs are slightly longer, but idk if they were any more useful: https://book.cakephp.org/1.3/en/The-Manual/Core-Console-Applications/Code-Generation-with-Bake.html |
# |
Jan 8th 2020, 11:01 |
savant |
the bake docs in 2.x were these: https://book.cakephp.org/2/en/console-and-shells/code-generation-with-bake.html |
# |
Jan 8th 2020, 11:01 |
wizardfix |
It seems like a significant omission to me. Perhaps I need to look at the CakePHP 2 docs... |
# |
Jan 8th 2020, 11:01 |
savant |
I _feel_ as though thats in the “Code Generation with Bake” section, but maybe im not understanding what you would expect instead |