# |
Jun 28th 2017, 08:52 |
savant |
then use the cakephp error handler to catch all the things and log as appropes |
# |
Jun 28th 2017, 08:52 |
bernat |
no PHP7 for now |
# |
Jun 28th 2017, 08:52 |
savant |
so you dont get warnings |
# |
Jun 28th 2017, 08:51 |
bernat |
but I just want the PHP messages |
# |
Jun 28th 2017, 08:51 |
savant |
and run php7? to turn everything to exeptions |
# |
Jun 28th 2017, 08:51 |
bernat |
xD |
# |
Jun 28th 2017, 08:51 |
savant |
change your error settings to report everything |
# |
Jun 28th 2017, 08:51 |
savant |
but too drunk to find the copy paste code |
# |
Jun 28th 2017, 08:51 |
savant |
yes |
# |
Jun 28th 2017, 08:50 |
bernat |
Is there a way to configure error handling so that all PHP messages including warnings and notices go to the error log? |
# |
Jun 28th 2017, 08:48 |
bernat |
no worries. :) |
# |
Jun 28th 2017, 08:48 |
neon1024 |
Now I feel silly ;) |
# |
Jun 28th 2017, 08:48 |
neon1024 |
Thanks @barnat |
# |
Jun 28th 2017, 08:48 |
bernat |
I don't know how that would work but it might have the effect you're seeing. |
# |
Jun 28th 2017, 08:48 |
neon1024 |
Hah! |
# |
Jun 28th 2017, 08:47 |
neon1024 |
Oh yes, so I do |
# |
Jun 28th 2017, 08:47 |
bernat |
you have duplicated validation rules for package_id. |
# |
Jun 28th 2017, 08:45 |
neon1024 |
As i can add offers from two places in my cms, I need to conditionally validate it |
# |
Jun 28th 2017, 08:45 |
neon1024 |
Perhaps I should go check the core test suite |
# |
Jun 28th 2017, 08:45 |
neon1024 |
Exactly |
# |
Jun 28th 2017, 08:45 |
bernat |
you are seeing the validation message but the callback doesn't run? |
# |
Jun 28th 2017, 08:44 |
neon1024 |
Yeh, https://pastebin.com/fwdn2EYh |
# |
Jun 28th 2017, 08:44 |
neon1024 |
As I can even change the validation message and the entity reflects that change |
# |
Jun 28th 2017, 08:44 |
bernat |
Then something must be wrong in your validation code. Are you returning the validator? |
# |
Jun 28th 2017, 08:43 |
neon1024 |
Yep |
# |
Jun 28th 2017, 08:42 |
bernat |
is the right field populated after patchEntity? |
# |
Jun 28th 2017, 08:42 |
neon1024 |
Well you’ve told it to use 3 fields, and you’re surprised it’s using 3 fields?! |
# |
Jun 28th 2017, 08:42 |
vix |
please help ->setDisplayField in model with 3 fields. In HTML Select its showing A;B;C . How to get rid of this semi colon? Thanx in advance |
# |
Jun 28th 2017, 08:40 |
neon1024 |
Yes |
# |
Jun 28th 2017, 08:40 |
bernat |
in OffersTable? |
# |
Jun 28th 2017, 08:39 |
neon1024 |
@barnat Inside my callback method, https://book.cakephp.org/3.0/en/core-libraries/validation.html#conditional-validation |
# |
Jun 28th 2017, 08:39 |
bernat |
neon1024, where are you putting the exit staments? |
# |
Jun 28th 2017, 08:39 |
vix |
setDisplayField in model with 3 fields. In HTML Select its showing 1;2;3 . How to get rid of this semi colon? Thanx in advance |
# |
Jun 28th 2017, 08:38 |
hmic |
yes |
# |
Jun 28th 2017, 08:37 |
neon1024 |
I’m almost certain that patchEntity calls validation, rather than save |
# |
Jun 28th 2017, 08:37 |
neon1024 |
I’m using patchEntity to patch my Package entity, with associated Offers through a hasMany. I’ve created a callback method in my validation for Offers.package_id, with a var_dump();exit; - but it’s not being called, as I have a var_dump(); exit; after the patchEntity() in my controller. What am I missing? Why aren’t the validation methods exit statements being reached? |
# |
Jun 28th 2017, 07:30 |
adriencs |
o/ |
# |
Jun 28th 2017, 07:24 |
neon1024 |
Morning all |
# |
Jun 28th 2017, 06:50 |
rudy1976s |
thank you |
# |
Jun 28th 2017, 06:50 |
savant |
Crud-view.readthedocs.io |
# |
Jun 28th 2017, 06:49 |
savant |
It's linked there |