# |
Mar 5th 2018, 22:07 |
ricksaccous |
i still don't get any debug code |
# |
Mar 5th 2018, 22:07 |
ricksaccous |
"works" |
# |
Mar 5th 2018, 22:07 |
ricksaccous |
if i copy it out of the pdf folder and into /Templates/Orders/ in the plugin it works |
# |
Mar 5th 2018, 22:06 |
savant |
where is it looking |
# |
Mar 5th 2018, 22:06 |
ricksaccous |
even though the documentation says it should be looking there |
# |
Mar 5th 2018, 22:06 |
ricksaccous |
but I have it in the plugin in /Templates/Orders/pdf but it's not looking there |
# |
Mar 5th 2018, 22:06 |
savant |
maybe you dont have the proper view file |
# |
Mar 5th 2018, 22:05 |
ricksaccous |
when I access the view I get this error: Error: The view for OrdersController::generateShippingLabel() was not found. |
# |
Mar 5th 2018, 22:03 |
ricksaccous |
so I can see what command it's trying to run |
# |
Mar 5th 2018, 22:03 |
ricksaccous |
I at least want to be able to read the debug(); exit; I have going on in the plugin |
# |
Mar 5th 2018, 22:02 |
ricksaccous |
the pdf I want is in OrdersController::generateShippingLabel |
# |
Mar 5th 2018, 22:02 |
ricksaccous |
here's a gist of relevant items: https://gist.github.com/Modicrumb/932e819f81919b1c2959d5b9f556744c |
# |
Mar 5th 2018, 21:55 |
ricksaccous |
that wasn't it |
# |
Mar 5th 2018, 21:54 |
ricksaccous |
i have some code in my beforeRender in my appController which sets view class name |
# |
Mar 5th 2018, 21:53 |
savant |
whats the problem |
# |
Mar 5th 2018, 21:53 |
ricksaccous |
sheeeeeet |
# |
Mar 5th 2018, 21:53 |
ricksaccous |
i think i know the problem |
# |
Mar 5th 2018, 21:53 |
ricksaccous |
routes are set u.... |
# |
Mar 5th 2018, 21:52 |
ricksaccous |
requesthandler is going |
# |
Mar 5th 2018, 21:52 |
ricksaccous |
even if i do in console a wkhtmltopdf on my localhost i'm getting nothing, just a fail to load |
# |
Mar 5th 2018, 21:52 |
ricksaccous |
and i get an unusable pdf |
# |
Mar 5th 2018, 21:52 |
ricksaccous |
I'm putting debug and exit; code in the plugin but it doesn't ever seem to be hitting the plugin |
# |
Mar 5th 2018, 21:51 |
ricksaccous |
ugh I'm having trouble with CakePdf |
# |
Mar 5th 2018, 21:41 |
admad |
@birdy247 lemme know if things work smoothly with the dev branch so i can push a new release, gn |
# |
Mar 5th 2018, 21:40 |
savant |
I think lazy loading is an anti-pattern |
# |
Mar 5th 2018, 21:39 |
savant |
ive never used it though |
# |
Mar 5th 2018, 21:39 |
savant |
sounds like a bug. I would file an issue in that repo |
# |
Mar 5th 2018, 21:38 |
mikesmoniker |
Without the lazy loading trait, that works fine. With it, it has no effect. |
# |
Mar 5th 2018, 21:38 |
mikesmoniker |
The use case is appending a “default” item to a list as part of an API response. E.g. `array_unshift($customer->brandings, $defaultSystemBrand);` |
# |
Mar 5th 2018, 21:37 |
mikesmoniker |
Maybe I could. I’m not really dealing in form/request data.. |
# |
Mar 5th 2018, 21:36 |
savant |
maybe you should use patchentity to associate it instead? |
# |
Mar 5th 2018, 21:36 |
mikesmoniker |
It does nothing, but without the lazy loading trait it does. |
# |
Mar 5th 2018, 21:36 |
savant |
no-op? |
# |
Mar 5th 2018, 21:35 |
mikesmoniker |
I’m noticing some oddness after installing jeremyharris/cakephp-lazyload. Specifically, `$entity->myrelationship[0] = $someEntity` is now a _no-op_. Anyone familiar with the plugin know of any other caveats like that? |
# |
Mar 5th 2018, 20:56 |
savant |
@gsitex i do something similar here for persisting form errors: https://github.com/cakephp/plugins.cakephp.org/blob/master/src/Controller/Component/PersistErrorsComponent.php |
# |
Mar 5th 2018, 20:55 |
savant |
@gsitex you’d need to save the data into the session to do that |
# |
Mar 5th 2018, 20:55 |
savant |
@ghoritrilochan that seems to load here |
# |
Mar 5th 2018, 20:55 |
savant |
xhprof is… slow and I would not recommend running it there |
# |
Mar 5th 2018, 20:54 |
savant |
meder: I use newrelic for app profiling in prod |
# |
Mar 5th 2018, 20:52 |
meder |
or profilers in general, on production/staging |
# |
Mar 5th 2018, 20:52 |
meder |
iirc someone mentioned it last week |