# |
Nov 6th 2019, 11:09 |
jotpe |
@javier.villanueva Thanks, I use a Theme for my FE and my BE, and tried remove it...but the same error. |
# |
Nov 6th 2019, 11:05 |
nike90 |
hi guys, I know that someone can help me, I moved my application from the develop server to the live system, now I have the problem with "require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';", I know that this is something with the .htaccess, but I set all files like in documentation |
# |
Nov 6th 2019, 10:59 |
challgren |
Does it generate a pdf? Have you tried opening it with text editor? |
# |
Nov 6th 2019, 10:59 |
javier.villanueva |
I dont know if you use any theme... |
# |
Nov 6th 2019, 10:59 |
javier.villanueva |
´´´ if(!in_array($this->request->getParam('_ext'),['json','csv','pdf'])) { $this->viewBuilder()->setTheme('AdminLTE'); $this->viewBuilder()->setClassName('AdminLTE.AdminLTE'); } ´´´ |
# |
Nov 6th 2019, 10:58 |
javier.villanueva |
I had this problem too, works from cli but not rendering html in layout. My problem was that I use a theme (admintle) in this cases I need use theme only in common extension |
# |
Nov 6th 2019, 10:56 |
challgren |
Weird |
# |
Nov 6th 2019, 10:56 |
jotpe |
So no Helpers or Anything involved |
# |
Nov 6th 2019, 10:56 |
jotpe |
This is really strange: I rendered the the view into a html file and converted this by cli with `wkhtmltopdf test.html test.pdf` <--- Works. If I use the rendered html file as layout with proper urls <---Breaks |
# |
Nov 6th 2019, 10:43 |
challgren |
Ok cause I had an issue where it was missing a helper and was in a loop. @jotpe for debuging the best I found was to get the html that would be sent to wkhtmltopdf and then manually inspect it/process it |
# |
Nov 6th 2019, 10:42 |
javier.villanueva |
find it in your bootstrap.php |
# |
Nov 6th 2019, 10:41 |
jotpe |
How can i debug the url? |
# |
Nov 6th 2019, 10:41 |
jotpe |
@challgren not in this layout, but generally yes. The fullbaseurl should be localhost:8090 |
# |
Nov 6th 2019, 10:40 |
challgren |
@jotpe Are you using any other helpers? Like AssetCompress? |
# |
Nov 6th 2019, 10:40 |
javier.villanueva |
'fullBaseUrl' => 'http://localhost', |
# |
Nov 6th 2019, 10:40 |
javier.villanueva |
your fullbaseurl is localhost? |
# |
Nov 6th 2019, 10:39 |
jotpe |
It's really strange |
# |
Nov 6th 2019, 10:39 |
jotpe |
hm |
# |
Nov 6th 2019, 10:39 |
javier.villanueva |
I use full base too |
# |
Nov 6th 2019, 10:39 |
javier.villanueva |
I dont know, I have not this problem : / |
# |
Nov 6th 2019, 10:36 |
jotpe |
like this: <?= $this->Html->image('Accounting.print/img.png', ['id' => 'return-address', 'fullBase' => true]) ?> |
# |
Nov 6th 2019, 10:36 |
jotpe |
I use full base url |
# |
Nov 6th 2019, 10:36 |
javier.villanueva |
uhm |
# |
Nov 6th 2019, 10:36 |
jotpe |
Conversion doesn't work for me, if I add some kind of asset (css/img) to the layout. Then it breaks |
# |
Nov 6th 2019, 10:35 |
javier.villanueva |
try to disable another plugins to test |
# |
Nov 6th 2019, 10:35 |
javier.villanueva |
I had a problem cause I had another plugin not compatible |
# |
Nov 6th 2019, 10:35 |
javier.villanueva |
I use it in local |
# |
Nov 6th 2019, 10:34 |
jotpe |
For some reason on my local system thhe pdf generation "loops" |
# |
Nov 6th 2019, 10:34 |
nayakvradhit |
I am having GeocodedBehavior.php file inside app/model/behavior folder But the thing is in behaviorcollection.php file the line pluginsplit($behavior,true) And it is assigned to list($plugin,$name) But I am getting $plugin gives null eventhough I am having DebugKit in the app/plugin folder can you please help me with this please in cakephp 2.10.13 |
# |
Nov 6th 2019, 10:33 |
jotpe |
Anyone has experience with wkhtmltopdf and the local php built-in webserver? I need to generate PDFs and this works on my remote development server, but not local (recent wkhtmltopdf with qt patched) and php 7.2 |
# |
Nov 6th 2019, 10:29 |
dev.cyrusjayson |
Thanks @javier.villanueva |
# |
Nov 6th 2019, 10:28 |
javier.villanueva |
this example is from https://book.cakephp.org/3/en/orm/associations.html |
# |
Nov 6th 2019, 10:27 |
slackebot1 |
->setConditions(['WorkAddress.label' => 'Work']) ->setDependent(true); } } ``` |
# |
Nov 6th 2019, 10:27 |
javier.villanueva |
```{ public function initialize(array $config) { $this->hasOne('HomeAddress', [ 'className' => 'Addresses' ]) ->setProperty('home_address') ->setConditions(['HomeAddress.label' => 'Home']) ->setDependent(true); $this->hasOne('WorkAddress', [ 'className' => 'Addresses' ]) ->setProperty('work_address') |
# |
Nov 6th 2019, 10:27 |
javier.villanueva |
one example |
# |
Nov 6th 2019, 10:26 |
dev.cyrusjayson |
and how the associations looks like in the model ? |
# |
Nov 6th 2019, 10:26 |
javier.villanueva |
Matches hasOne AwayTeam |
# |
Nov 6th 2019, 10:25 |
javier.villanueva |
Matches hasOne HomeTeam |
# |
Nov 6th 2019, 10:25 |
javier.villanueva |
away_team_id |
# |
Nov 6th 2019, 10:25 |
javier.villanueva |
home_team_id |
# |
Nov 6th 2019, 10:23 |
dev.cyrusjayson |
I have Matches model and it has two fields coming from Teams model. so the Matches model has this ``` Teams id *Matches* team_1 <team id> FK team_2 <team id> FK ``` what is the proper way? |