Log message #4116559

# At Username Text
# Feb 12th 2018, 14:03 flavius low level issues? I currently have a `throw new \Exception('test exception');` in one of my actions and its intercepted by the middleware currently, how would i produce a low level error to test the bootstrap handlers?
# Feb 12th 2018, 14:01 dereuromark @jameg83 dunno, but try to keep your local setup close to production for these reasons. My findings for pdf you can find here btw: https://www.dereuromark.de/2014/04/08/generating-pdfs-with-cakephp/
# Feb 12th 2018, 14:00 dereuromark No, they still are needed to catch low level issues
# Feb 12th 2018, 14:00 jameg83 @dereuromark could that be causing the issues? I’ll just try it live.
# Feb 12th 2018, 13:59 flavius quick question, in `bootstrap.php` there's the code to register application error and exception handlers, are those now rendered obsolete because of the newly implemented `ErrorHandlerMiddleware`? I'm guessing the middleware will catch errors and exceptions BEFORE the handlers (also applies for CLI?)
# Feb 12th 2018, 13:37 dereuromark I would never work with localhost etc :slightly_smiling_face: Always use a proper vhost setup. Makes it closer to production and life so much easier.
# Feb 12th 2018, 13:36 slackebot1 rewrite issues. I’ll try tying the url manually and doing a bit more fiddling when I get home tonight. The project is my bit on the side. Thanks for your quick reply and assistance.
# Feb 12th 2018, 13:36 jameg83 @hmic I am working locally on my dev server so my urls do read http://localhost.... etc but they are absolute. I’m using the html helpers and setting the fullBase attribute true in the options. I’ve checked the output in html and checked that the ctp file opens as intended, which I’m happy with. For some reason when I run through cakepdf it hangs in the browser. Other people seems to have had various issue with image file permissions a
# Feb 12th 2018, 13:23 hmic actually, i'm actually not quite sure why the engine does get the rendered html as an input string, instead of the requested url, which would make the relative path issues go away - well, sure, the other engines do not work this way, but in the wkhtmltopdf case this would be more straight forward to me...
# Feb 12th 2018, 13:21 hmic try to load the generated html document without running it through wkpdftohtml, does it look correct, including all the images? - check the urls in this generated file, are they reading your correct domainname and path, *not* localhost or the like?
# Feb 12th 2018, 13:20 hmic wkthtmltopdf reads a html file. this has no filesystem urls, the docs refer to the fact that you need to have *urls* for your assets that look like: http://hostname.domain/path/to/app/img/logo.jpg, instead of just img/logo.jpg
# Feb 12th 2018, 13:19 hmic i think you misunderstand the "absolute path" thing here
# Feb 12th 2018, 13:10 jameg83 @hmic from reading various stack overflow issues that people are having with images not displaying with cakepdf, aside from the usual absolute path issues, it seems that image file and folder permissions can cause problems. I just wanted to tap into the knowledge of more experienced users.
# Feb 12th 2018, 13:00 hmic jameg83: whats your question actually?!
# Feb 12th 2018, 12:32 jameg83 Does anyone have any insight into wkhtmltopdf access rights? Thanks
# Feb 12th 2018, 12:28 flavius @channel
# Feb 12th 2018, 12:27 flavius @everyone
# Feb 12th 2018, 12:25 flavius eyyy, congrats on 300 releases of cakephp :thumbsup:
# Feb 12th 2018, 11:31 dereuromark but he did
# Feb 12th 2018, 11:23 saeideng @dereuromark I just want to inserting data , not truncate it :D
# Feb 12th 2018, 11:09 jameg83 The browser, that is,
# Feb 12th 2018, 11:08 jameg83 It hangs, and is unresponsive.
# Feb 12th 2018, 11:02 hmic what does "crash" mean?
# Feb 12th 2018, 11:02 dereuromark @saeideng @javier_rodri1989 Using shim plugin you have a truncate() method available.
# Feb 12th 2018, 11:02 jameg83 Hi, I’m having trouble with static assets when using cakepdf. I’ve set the fullBase option in my helper and checked the output in a ctp template but they seem to crash my browser and dev server. I’ve done some googling and it seems it could be an issue with folder permissions. Had anyone experienced this?
# Feb 12th 2018, 10:56 kitcat711 bonjour
# Feb 12th 2018, 10:45 hmic ;-)
# Feb 12th 2018, 10:40 LubosR thansk both
# Feb 12th 2018, 10:40 LubosR ignore me, it works. tried in different form
# Feb 12th 2018, 10:36 LubosR edgaras.janusauskas, hmic: thanks. tried to use button; exactly the edgaras.janusauskas example and I have no action data in the request. Do you use Security component (I do)?
# Feb 12th 2018, 10:25 hmic yes, looks like they are using button, not type=submit, like i said...
# Feb 12th 2018, 10:19 edgaras.janusauskas I use ``` echo $this->Form->button('Delete All', ['name' => 'action', 'value' => 'deleteAll']); echo $this->Form->button('Another action', ['name' => 'action', 'value' => 'anotherAction']); ``` then check `$this->request->data('action');`
# Feb 12th 2018, 10:09 LubosR Thanks, will do more tests and see :) this is what you were talking about re crud-view I think https://github.com/FriendsOfCake/crud-view/blob/master/src/Template/Element/form/buttons.ctp
# Feb 12th 2018, 10:07 hmic would have to look up the html spec, but there is something about needing to deal with the values in my mind back from years ago
# Feb 12th 2018, 10:06 hmic like i said, i *think* you cant set a name to a submit, but a value
# Feb 12th 2018, 10:06 LubosR thanks for the hint, looking at crud-view
# Feb 12th 2018, 10:06 LubosR but when I submit data and seeing debug($this->request->data_ in the action, the name="delete" data are not there
# Feb 12th 2018, 10:05 LubosR https://cdn.pbrd.co/images/H7hpZM4.png
# Feb 12th 2018, 10:05 LubosR I made submit, see screenshot
# Feb 12th 2018, 10:02 hmic hint: check crud-view, they use multiple submit buttons on the edit actions
# Feb 12th 2018, 10:02 hmic but just a button does work