# |
May 30th 2017, 07:13 |
saeideng |
$this->loadComponent('Ajax.Ajax',[ 'flashKey' => 'Flash.user_login']); $mess=""; $this->Flash->error(__($mess), ['clear'=>true,'key' => 'user_login']); $this->request->session()->write('Flash.user_login.error', [$mess]); $this->set('_serialize', []); |
# |
May 30th 2017, 07:11 |
saeideng |
i dont know ,now |
# |
May 30th 2017, 07:11 |
saeideng |
probably that issue is related to cake core |
# |
May 30th 2017, 07:10 |
saeideng |
i dont know what hapents but if i find that reason ,yes |
# |
May 30th 2017, 07:09 |
dereuromark |
You can make a PR with your suggested fix |
# |
May 30th 2017, 07:08 |
saeideng |
your plugin not works correctly |
# |
May 30th 2017, 07:08 |
saeideng |
when i using $this->render('another_ctp_file'); |
# |
May 30th 2017, 07:07 |
saeideng |
i used ajax plugin |
# |
May 30th 2017, 07:07 |
saeideng |
@dereuromark |
# |
May 30th 2017, 07:07 |
saeideng |
hi |
# |
May 30th 2017, 01:52 |
Leonardo_0112 |
in the controller scope |
# |
May 30th 2017, 01:52 |
Leonardo_0112 |
$this->Banner->getEventManager()->dispatch(new CakeEvent('Model.afterDelete', $this->Banner)); did the trick ;) |
# |
May 30th 2017, 01:37 |
royalty |
good luck |
# |
May 30th 2017, 01:37 |
royalty |
I'm confused anyway I think I'm going to go get some exercise |
# |
May 30th 2017, 01:36 |
Leonardo_0112 |
royalty, I was using a component, but now I'm putting it on a bahavior |
# |
May 30th 2017, 01:36 |
Leonardo_0112 |
royalty, I'd like to do the same with Banners |
# |
May 30th 2017, 01:36 |
Leonardo_0112 |
royalty, because when I delete product or category, the behavior afterDelete clear all not used images |
# |
May 30th 2017, 01:35 |
royalty |
lol |
# |
May 30th 2017, 01:35 |
royalty |
if you want to do that but not actually afterDelete what's the point |
# |
May 30th 2017, 01:35 |
royalty |
and react to that event |
# |
May 30th 2017, 01:35 |
royalty |
instead you could create another event |
# |
May 30th 2017, 01:35 |
royalty |
why would you ever call it manually? |
# |
May 30th 2017, 01:34 |
Leonardo_0112 |
but seems like it is not working |
# |
May 30th 2017, 01:34 |
Leonardo_0112 |
I'd like to do is: $this->Banner->query('TRUNCATE TABLE banners;'); new CakeEvent('Model.afterDelete', $this); |
# |
May 30th 2017, 01:33 |
Leonardo_0112 |
In Cake 2 can I fire model afterDelete manually? |
# |
May 30th 2017, 01:25 |
royalty |
got it working but that was messy :( |
# |
May 30th 2017, 01:10 |
royalty |
I'll have to edit the widget |
# |
May 30th 2017, 01:10 |
royalty |
I think I know why, I'm simply spitting out the model message for the error instead of calling upon the custom error message I set |
# |
May 30th 2017, 01:09 |
royalty |
hmmmmm |
# |
May 30th 2017, 01:09 |
royalty |
I think what's happening is the options I have given are not being respected |
# |
May 30th 2017, 01:08 |
royalty |
however, the translated version is not showing |
# |
May 30th 2017, 01:07 |
royalty |
and I have errors set up in the field options like: https://gist.github.com/Modicrumb/a86f0efb53d5e03b1a648ea4c424fe0a |
# |
May 30th 2017, 01:02 |
royalty |
I am messing around with displaying errors for the field |
# |
May 30th 2017, 01:02 |
royalty |
so I am trying to build a form widget |
# |
May 30th 2017, 00:25 |
lpj145 |
somebody try use Crud with Cake 3.4 ? |
# |
May 30th 2017, 00:08 |
hiromi2424 |
My understand: set data to entity without patchEntity/newEntity will make entity have inconsistent data. validation and marshal is for set consistent data. |
# |
May 30th 2017, 00:06 |
hiromi2424 |
I don’t think not only for query formatting. It is for set correct data to entity. |
# |
May 30th 2017, 00:02 |
meder_ |
as opposed to more manual? |
# |
May 30th 2017, 00:01 |
meder_ |
like for related tables bound? so it's just an easy way to basically form a query to do an update? |
# |
May 29th 2017, 23:59 |
hiromi2424 |
meder_ not only validation. association objects are initialized e.g. when _ids given |
# |
May 29th 2017, 23:59 |
meder_ |
is patchEntity primarily just used for validation? if so, what's the point of sending validate: false (or equivalent) ? |