# |
Apr 25th 2017, 17:22 |
chris-andre |
xdebug(): call to undefined method. |
# |
Apr 25th 2017, 17:21 |
chris-andre |
Allright, doesn't get it. Here my method: https://gist.github.com/chris-andre/af7981db40095016c815800e1c56b15c |
# |
Apr 25th 2017, 17:17 |
ypnos |
you can use xdebug |
# |
Apr 25th 2017, 17:17 |
chris-andre |
? |
# |
Apr 25th 2017, 17:17 |
chris-andre |
Sorry for asking stupidly, but what do I do to debug my callback |
# |
Apr 25th 2017, 17:15 |
ypnos_ |
saving entities with an error fails and returns false, but you need to propagate it in the callback |
# |
Apr 25th 2017, 17:15 |
chris-andre |
I thought the transaction would fail if any entity has an error, but it doesn't. |
# |
Apr 25th 2017, 17:15 |
ypnos_ |
how does your callback look like? maybe show a gist? |
# |
Apr 25th 2017, 17:14 |
chris-andre |
Maybe I just haven't been able to make the transaction fail. |
# |
Apr 25th 2017, 17:13 |
ypnos_ |
chris-andre where does the failure happen then? you need to check the results of operations within your callback or propagate the return value, e.g. save() returns false on failure |
# |
Apr 25th 2017, 17:11 |
chris-andre |
@ypnos_ It looks like it return `null` regardless |
# |
Apr 25th 2017, 17:10 |
ypnos_ |
chris-andre catch exceptions and also check the return value of transactional() for false, both means not successful. https://api.cakephp.org/3.0/class-Cake.Database.Connection.html#_transactional |
# |
Apr 25th 2017, 16:21 |
chris-andre |
Hello! Is it a way to check if a `$table->connection()->transactial()` is successful or not? |
# |
Apr 25th 2017, 15:59 |
awi |
The file uploader somehow falls with Hash::get receiving anything but an array or arrayaccess |
# |
Apr 25th 2017, 15:57 |
awi |
Maybe someone can help me with this one: https://github.com/FriendsOfCake/cakephp-upload |
# |
Apr 25th 2017, 15:48 |
awi |
hi. is josegonzalez somewhere around? |
# |
Apr 25th 2017, 15:16 |
inoas |
though I liked the Session Containers |
# |
Apr 25th 2017, 15:15 |
inoas |
I had to work with ZF2 this week... horrible :( |
# |
Apr 25th 2017, 15:15 |
inoas |
I am pretty sure we could be more strict, not sure if it would be overall better though ;) |
# |
Apr 25th 2017, 15:15 |
inoas |
just imagine we had no auto tables, no auto entities, accessible being set to default, fieldLists always required, CSRF always on, http disallowed (only https) etc ;P |
# |
Apr 25th 2017, 15:14 |
inoas |
however that guy... no comment ;) |
# |
Apr 25th 2017, 15:14 |
inoas |
sadly I don't use reddit. I do think full-fledge frameworks give you a false sense of security unless they make it very hard to work with them :P |
# |
Apr 25th 2017, 15:14 |
inoas |
sad,, |
# |
Apr 25th 2017, 15:13 |
dereuromark |
hehe |
# |
Apr 25th 2017, 15:12 |
inoas |
I mean in the worst hellhole of spaghetti-code it can't take you days to add a link |
# |
Apr 25th 2017, 15:12 |
inoas |
haha that guy is FOS :E |
# |
Apr 25th 2017, 15:12 |
inoas |
"One of my early tasks was to … add a link to something on some page. It took me few days to add this stupid link. Why?" |
# |
Apr 25th 2017, 15:12 |
inoas |
dereuromak |
# |
Apr 25th 2017, 15:00 |
julez |
thank you |
# |
Apr 25th 2017, 15:00 |
julez |
ahh, got it |
# |
Apr 25th 2017, 14:58 |
julez |
erm. but the Plugin is called Matriculations?! |
# |
Apr 25th 2017, 14:58 |
dereuromark |
nothing else |
# |
Apr 25th 2017, 14:58 |
dereuromark |
the 2nd is the namespace kind of - and that would be PluginName.Model |
# |
Apr 25th 2017, 14:57 |
dereuromark |
thats wrong |
# |
Apr 25th 2017, 14:57 |
julez |
App::uses('MatriculationAppModel', 'Matriculations.MatriculationAppModel'); |
# |
Apr 25th 2017, 14:57 |
julez |
i did |
# |
Apr 25th 2017, 14:57 |
dereuromark |
you always need to include it - it is the same as in 3.x with use statements |
# |
Apr 25th 2017, 14:57 |
dereuromark |
doesnt matter |
# |
Apr 25th 2017, 14:57 |
julez |
'MatriculationAppModel' resides in the exact same folder |
# |
Apr 25th 2017, 14:57 |
dereuromark |
are you missing the App::uses() statement for it? |
# |
Apr 25th 2017, 14:57 |
julez |
but it's not found: Fatal error: Class 'MatriculationAppModel' not found in ***/app/Plugin/Matriculations/Model/Matriculation.php on line 6 |