Does event 'writeCreate' still work? Editor Version 1.7.3
Does event 'writeCreate' still work? Editor Version 1.7.3
rw152
Posts: 56Questions: 15Answers: 1
in Bug reports
I'm using editor version 1.7.3.
Even if I put a
->on('writeCreate ',function($editor,$id,$values) {
die('im dead');
})
Nothing pops up and the server spits out data as usual. Am I missing something painfully obvious? I'd like to:
- insert data after the row has been created
- retrieve that data before the results are sent to the browser (i'm working my way around an MJoin issue)
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
That absolutely should work. If you have a look in the
Editor.php
file and search forwriteCreate
its in the_insert
function. Only if there is no id returned from the insert would it fail.Could you show me your whole code so I can try to reproduce it?
Thanks,
Allan
Hi Allan, thanks. I verified that last night before posting and here's some confirmation:
I don't think I can post the code here, unfortunately (sorry!), but appreciate the confirmation that it should work. I'll keep digging and see if I can find anything.
FWIW we have a left join on "Table B" from "Table A" and also an MJOIN which links to "Table C" using "Table B" (from "Table A")
Also
->on('writeEdit')
works correctly
Been chasing this awhile... turns out I had the event written as
->on('writeCreate ')
(note the space!)Removed the space and voila, it worked. Sorry for the annoying post.