Log message #4199226

# At Username Text
# Aug 21st 2019, 14:56 slackebot ->cache('tagRoutes') ->toArray() ))->extract('alias')->toArray() ); });``` ``` $tagRoutesPiped = Cache::remember('tagRoutesPiped', function () { return (string)implode( '|', (new Collection( TableRegistry::getTableLocator() ->get('Tags') ->find('all') ->select(['alias'])
# Aug 21st 2019, 14:56 daniel.upshaw It's a great call.... though still error with both of these: ``` $tagRoutesPiped = Cache::remember('tagRoutesPiped', function () { return (string)implode( '|', (new Collection( TableRegistry::getTableLocator() ->get('Tags') ->find('all') ->select(['alias']) ->where(['route' => 1])
# Aug 21st 2019, 14:55 admad that will cause the query to be actually run and not give you the pdo serialization error
# Aug 21st 2019, 14:54 admad @daniel.upshaw add a `->toArray()` after `->cache()`
# Aug 21st 2019, 14:51 daniel.upshaw Same with this, no error: ``` $tagRoutesPiped = Cache::remember('tagRoutesPiped', function () { return implode( '|', ['test', 'this', 'debug'] ); });```
# Aug 21st 2019, 14:50 daniel.upshaw This does not show the error, if I `return 'string';`
# Aug 21st 2019, 14:50 daniel.upshaw ``` $tagRoutesPiped = Cache::remember('tagRoutesPiped', function () { return (string)implode( '|', (new Collection( TableRegistry::getTableLocator() ->get('Tags') ->find('all') ->select(['alias']) ->where(['route' => 1]) ))->extract('alias')->toArray() ); });```
# Aug 21st 2019, 14:45 daniel.upshaw For some reason, on the first page load with cache cleared, it is seeing a PDO instance somewhere
# Aug 21st 2019, 14:45 daniel.upshaw It's so strange, it still does it
# Aug 21st 2019, 14:45 daniel.upshaw I'll try force casting the `implode` result to `(string)`
# Aug 21st 2019, 14:44 daniel.upshaw `$tagRoutesPiped` is a string
# Aug 21st 2019, 14:44 daniel.upshaw But not on subsequent pageloads
# Aug 21st 2019, 14:44 daniel.upshaw That error happens after a clearing `tmp/*` and refreshing
# Aug 21st 2019, 14:44 daniel.upshaw `Error: You cannot serialize or unserialize PDO instances`
# Aug 21st 2019, 14:43 slackebot });```
# Aug 21st 2019, 14:43 daniel.upshaw ```$tagRoutesPiped = Cache::remember('tagRoutesPiped', function () { return implode( '|', (new Collection( TableRegistry::getTableLocator() ->get('Tags') ->find('all') ->select(['alias']) ->where(['route' => 1]) ->cache('tagRoutes') ))->extract('alias')->toArray() );
# Aug 21st 2019, 14:43 daniel.upshaw Experiencing odd behavior with Caching
# Aug 21st 2019, 14:24 ricksaccous admad is prob right where if you just lowered some paddings/margins in a couple places you'd be fine
# Aug 21st 2019, 14:23 ricksaccous i dunno
# Aug 21st 2019, 14:23 ricksaccous i would just test it from your main computer without cake if you could
# Aug 21st 2019, 14:14 admad problem is most likely in your html not wkhtmltopdf
# Aug 21st 2019, 14:12 scuadra this is the cakepdf configuration
# Aug 21st 2019, 14:11 scuadra 'margin' => [ 'bottom' => 0, 'left' => 0, 'right' => 0, 'top' => 0 ]
# Aug 21st 2019, 14:11 scuadra I set all margins to 0 :)
# Aug 21st 2019, 14:11 scuadra yes
# Aug 21st 2019, 14:10 ricksaccous try messing with the settings?
# Aug 21st 2019, 14:10 ricksaccous it probably just means some setting or something to do with page space is causing your pdf to be larger than the space it takes up on the web?
# Aug 21st 2019, 14:09 scuadra Hello. Has somebody encountered a blank page problem using CakePDF with wkhtmltopdf engine? When I export to pdf, my pdf has 2 pages but the second is absolutely empty.
# Aug 21st 2019, 14:08 neon1024 Here are the options, which are probably on api.cakephp.org also I’d imagine
# Aug 21st 2019, 14:08 neon1024 https://github.com/cakephp/cakephp/blob/master/src/View/Helper/FormHelper.php#L1130-L1160
# Aug 21st 2019, 14:07 maymeow @neon1024 @ricksaccous thank you ... I tried to find title not label ..
# Aug 21st 2019, 14:05 ricksaccous https://book.cakephp.org/3.0/en/views/helpers/form.html
# Aug 21st 2019, 14:05 neon1024 `$this->Form->control('example', ['label' => 'Cats vs Dogs?']);`
# Aug 21st 2019, 14:05 ricksaccous also there's a lot of reading to do on this
# Aug 21st 2019, 14:05 ricksaccous you give it the label option
# Aug 21st 2019, 14:03 maymeow How can I change title for form control?
# Aug 21st 2019, 13:18 ricksaccous hahaha i'm going to try
# Aug 21st 2019, 13:17 neon1024 If you attend Cakefest I can tell you more about it in my talk #shamelessplug
# Aug 21st 2019, 13:17 neon1024 +1 for Vue.js
# Aug 21st 2019, 13:13 ricksaccous i see
# Aug 21st 2019, 13:13 admad don't have to let js takeover your whole page like the other js frameworks