Log message #4102584

# At Username Text
# Dec 11th 2017, 19:09 meder hmic: hm i just recall that one time i tried to patch an entity and it crapping out on fields i never even specified (not through association)
# Dec 11th 2017, 19:08 meder will a transaction catch a db execution done through an event dispatcher?
# Dec 11th 2017, 18:55 ra7bi Thanks
# Dec 11th 2017, 18:54 dereuromark It is never empty since it is a collection. but you should be able to ->count() on it etc afaik.
# Dec 11th 2017, 18:51 ra7bi but not throwing any exception and that is because `$participantEventTokens` contain object
# Dec 11th 2017, 18:51 ra7bi i tried ``` $participantEventTokens = $this->paginate($this->ParticipantEventTokens); if (empty($participantEventTokens) { throw new NotFoundException(__('Event not found ')); } ```
# Dec 11th 2017, 18:50 ra7bi is there a function to check if `$this->paginate($query)` is empty or not ?
# Dec 11th 2017, 18:19 hmic associations will not be touched by that, if you don't ask for it
# Dec 11th 2017, 18:18 meder if i'm updating one field for an entity that has associations/many fields, is it reasonable to just patchEntity and specify that single field in the second argument?
# Dec 11th 2017, 18:02 dereuromark this doesnt sound like it could work, also sounds dangerous, could be undermined if not coded properly
# Dec 11th 2017, 18:01 joopm and i restrict those from Users(index and add)
# Dec 11th 2017, 18:00 joopm well i have a registration form which has people and user modells on it
# Dec 11th 2017, 18:00 dereuromark but starting to fatten your generic app controller here probably isnt a good idea.
# Dec 11th 2017, 17:59 dereuromark either stick to each controller, or use e.g. tinyauths version of auth_allow.ini to use a central place to inject those.
# Dec 11th 2017, 17:59 dereuromark anything is possible, but that doesnt mean it should be done.
# Dec 11th 2017, 17:59 joopm ot this is agoint oop and thats why is not possible
# Dec 11th 2017, 17:58 joopm is it possible to use $this->Authh->allow() to allow different controller's view?
# Dec 11th 2017, 17:58 joopm hello there
# Dec 11th 2017, 16:42 alex9 hahaha
# Dec 11th 2017, 16:41 alex9 Or rather, you guys figured it out and I fixed the code.
# Dec 11th 2017, 16:41 hmic do tell
# Dec 11th 2017, 16:41 alex9 Thanks, everyone! I figured it out!
# Dec 11th 2017, 16:35 neon1024 Ah well
# Dec 11th 2017, 16:35 neon1024 alex9 (IRC) APP [16:32] is there any reason why this would @work when debug is off but not while it’s on?
# Dec 11th 2017, 16:35 hmic or tell ppl not to use stupid names in slack like "js"
# Dec 11th 2017, 16:34 hmic maybe someone needs to educate the bot
# Dec 11th 2017, 16:34 neon1024 Which seems to keep tagging @work
# Dec 11th 2017, 16:34 hmic happens all the time...
# Dec 11th 2017, 16:34 neon1024 Hehe, something in the IRC bot translates as an at mention here in Slack
# Dec 11th 2017, 16:34 alex9 Maybe I'll try that. Thank you!
# Dec 11th 2017, 16:33 hmic and you dont even need to enable it at all, if you resort to e.g. var_dump() instead of debug()
# Dec 11th 2017, 16:33 hmic hint: you can enable debug at any point in time
# Dec 11th 2017, 16:33 hmic debugging protection? :P
# Dec 11th 2017, 16:33 hmic you bet is as good as mine
# Dec 11th 2017, 16:32 alex9 is there any reason why this would work when debug is off but not while it's on?
# Dec 11th 2017, 16:32 hmic alex9, if so, you will need to refactor it
# Dec 11th 2017, 16:31 hmic use $request, or a proper debugging setup to halt execution and introspect
# Dec 11th 2017, 16:31 alex9 So, I believe that the $_SESSION is being used to access session data added through the saml plugin. There's some session renaming going on as well.
# Dec 11th 2017, 16:31 hmic which is a good thing, as it prevents ppl from trying to do the wrong thing from the start - which is more changing session data than just accessing it
# Dec 11th 2017, 16:30 hmic session handler does this: $_SESSION = null; after copying the data to the reqeust object
# Dec 11th 2017, 16:30 alex9 When debug is turned off, I have no problem accessing the session